Author |
Message
|
KVBuser |
Posted: Thu May 19, 2011 2:55 am Post subject: Log User Trace statement in JavaCompute Node |
|
|
Newbie
Joined: 22 Oct 2010 Posts: 9
|
Hi,
In ESQL we can use the "LOG USER TRACE" statement to write a log line in the user trace log. I was wondering if a similar statement exists in Java. We would like to write towards the user trace log from within the Java computeNode.
Thanks for your reply !
Best Regards,
Kurt. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu May 19, 2011 3:07 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Yes, the documentation indicates that there is an existing method to do this in the Broker Java API. |
|
Back to top |
|
 |
Cogito-Ergo-Sum |
Posted: Thu May 19, 2011 3:57 am Post subject: |
|
|
 Master
Joined: 07 Feb 2006 Posts: 293 Location: Bengaluru, India
|
More specifically Logging errors with the JavaCompute node. _________________ ALL opinions are welcome.
-----------------------------
Debugging tip:When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
---Sherlock Holmes |
|
Back to top |
|
 |
KVBuser |
Posted: Fri May 20, 2011 5:11 am Post subject: |
|
|
Newbie
Joined: 22 Oct 2010 Posts: 9
|
Thanks for the feedback, but I still didn't find any Java method which will write towards the user trace log.
The sample which is referred by the link, is using the MbService.logError method which writes to the syslog/eventlog.
I am looking for a method which writes to the user trace log.
Thanks in advance ! |
|
Back to top |
|
 |
paintpot |
Posted: Fri May 20, 2011 5:56 am Post subject: |
|
|
Centurion
Joined: 19 Sep 2005 Posts: 112 Location: UK
|
I'm not aware of any way in Java, without writing it yourself.
You can use log4j to your own log file, or you could try wrapping the existing C implementation provided by IBM (which would do what you originally asked for) - I don't know how stable this would be, but it sounds like fun
See cciUserTrace and cciIsTraceActive etc. |
|
Back to top |
|
 |
KVBuser |
Posted: Fri May 20, 2011 6:30 am Post subject: |
|
|
Newbie
Joined: 22 Oct 2010 Posts: 9
|
That is indeed the conclusion I already made, but it isn't what I hoped for
Thanks for the reply ! |
|
Back to top |
|
 |
|