Author |
Message
|
DanielSonFocus |
Posted: Tue May 15, 2007 10:15 am Post subject: Java Compute Node Logs |
|
|
 Apprentice
Joined: 05 Jun 2005 Posts: 35 Location: Louisville, Kentucky
|
Hi... a newbie question for you. Does anyone know where the logs are written for Java Compute Nodes? Specifically where do calls to System.out.println() go?
I checked the "java.io.tmpdir" and couldn't find anything there |
|
Back to top |
|
 |
bijesh |
Posted: Thu Jun 21, 2007 10:13 pm Post subject: Re: Java Compute Node Logs |
|
|
Acolyte
Joined: 30 Jan 2007 Posts: 66
|
DanielSonFocus wrote: |
Hi... a newbie question for you. Does anyone know where the logs are written for Java Compute Nodes? Specifically where do calls to System.out.println() go?
I checked the "java.io.tmpdir" and couldn't find anything there |
When you start your broker from windows services, check the option "Allow services to interact with Desktop" and you will be able to see the System.out.println calls printed on your DataFlowEngine console.
Bijesh |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jun 22, 2007 3:09 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It's been discussed before.
Generally, you're better off using MbService methods to do logging.
If you really, somehow, need statement-by-statement logging, then you can use log4j without much trouble. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jbanoop |
Posted: Fri Jun 22, 2007 10:33 am Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
Somehow the MB's logging API seems a bit akward to use and it also comes with the possibility of flooding the syslog. Also found it difficult to switch off the logging unless you write a framework around the logging API to set the log levels.
Log4j is clean and neat and maybe you could even call the log4j methods from ESQL providing a good logging framework for your whole project. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jun 22, 2007 10:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The two apis are intended for different things. From what I can tell, the MbService API is intended for throwing error messages. Log4J is intended for providing code-level tracing/logging.
It would be nice to see an MbTrace API... _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jbanoop |
Posted: Fri Jun 22, 2007 12:07 pm Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
The MB Logging API sure does contain methods logInformation() and logWarning() which could make people think otherwise. But as Jeff said, the only logical use of it is to throw up errors from within java code to the MB log. |
|
Back to top |
|
 |
hakanhu |
Posted: Mon Jun 25, 2007 12:54 am Post subject: Java Compute Node Logs |
|
|
 Newbie
Joined: 30 Jan 2007 Posts: 7
|
On Unix systems, unhandled java exceptions and JVM internal errors are written to
<WorkPath>/components/<BrokerName>/<EG UUID>/stdout
<WorkPath>/components/<BrokerName>/<EG UUID>/stderr |
|
Back to top |
|
 |
ydsk |
Posted: Mon Aug 20, 2007 10:38 am Post subject: |
|
|
Chevalier
Joined: 23 May 2005 Posts: 410
|
And where do we find the 2 directories precisely on Windows or AIX, for example ?
thanks.
ydsk. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Aug 20, 2007 10:44 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
In general, DO NOT USE System.out or System.err from a Java Compute node.
DO NOT DO IT.
In general, <workpath> means the Broker workpath, as described in the Info Center.
In general, the <workpath> is different, entirely, on AIX than it is on Windows. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ydsk |
Posted: Mon Aug 20, 2007 12:00 pm Post subject: |
|
|
Chevalier
Joined: 23 May 2005 Posts: 410
|
<workpath> is "C:\Documents and Settings\All Users\Application Data\ibm\MQSI\" in my case.
It is in a hidden directory. So, we need to do this first:
To show all files in Windows Explorer:
Click Tools > Folder options. The Folder Options dialog box opens.
Click the View tab and select Show hidden files and folders.
Thanks.
ydsk. |
|
Back to top |
|
 |
tosaurav |
Posted: Tue Aug 28, 2007 9:49 am Post subject: |
|
|
Acolyte
Joined: 16 Jan 2007 Posts: 62
|
Bijesh
Quote: |
When you start your broker from windows services, check the option "Allow services to interact with Desktop" and you will be able to see the System.out.println calls printed on your DataFlowEngine console |
Is this option specific to windows version?In windows XP I couldnt see the option you mentioned.Please tell me the step. |
|
Back to top |
|
 |
|