cancel
Showing results for 
Search instead for 
Did you mean: 

Where does System.out.println go?

Former Member
0 Kudos

Hi Everyone: I know I've seen this topic before, but I'm still having some trouble. I would like to debug my EJBs, and so I've added some System.out.println statements to them. Where does that go? I've looked at the defaultTrace.trc files in the

C:\usr\sap\P48\JC00\j2ee\cluster\server0\log

folder, and haven't found any of the text that I think I am writing. I appreciate any guidance! Ian.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi lan,

I was facing the same question earlier, and now I think I have figured out one possible answer. Actually, where the System.out.println goes is up to the Server Admin to config. There is a default SYSTEM.OUT log controller ( under location controller side) pre-defined to cater for all System.out.println(). All the System.out.println() output is considered as INFO type log message. However, this default SYSTEM.OUT controller is not assigned with any real log destination, thus, we cannot find the output anywhere.

If you goes to the log configurator (using Visual Admin), you can locate this SYSTEM.OUT controller , and add in a default (Anonymous) destionation for it . (you need to toggle on the advance edit mode from the top menu , then you can add modify the destination settings of a Controller).

For Anonymous destionation, the println() output will sure go to the defaultTrace.trc (better view it using Log Viewer, instead of viewing it from the log file ).

Or , you can define a separate file (e.g. c:\temp\myStd.log ) as the log destination ..

Last but not the least, you need to set the ForceSingleTraceFile setting from 'YES' to 'NO' , then you can see your "myStd.log".

To change the ForceSingleTraceFile , go to Visual Admin, J2EE server --> Kernel --> LogManager.

Hope you find the above useful.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ian,

Why don't you try this option

debugging option

in NWDS ->Windows->show view->debug break point

hope this helps you

Regards,

RK

pravesh_verma
Active Contributor
0 Kudos

Hi Ian,

If you want to see what you are writing in the <b>defaultTrace.trc files</b> then instead of wrting System.out.println() you have to write <b>System.err.println();</b>

For eg, I am showing you the catch block of a code:

<b>

catch(Exception e)

{

<b>System.err.println("This is the error Statement" +e);</b>

}

</b>

Now when you will view this defaultTrace.trc file at the location C:\usr\sap\P48\JC00\j2ee\cluster\server0\log you will find what ever you have written in the System.err.println() statement.

I hope this solves your problem.

Regards

Pravesh