cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to see System.out outputs

Former Member
0 Kudos

Hello,

At the moment I can't see System.out.println at the defaultTrace file. How can I configure this to be shown there?

10X,

Roy

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Roy,

please check both documentations I referred to within this thread, already pointed to: /thread/30249 [original link is broken]

Within the first, see pages 12-17 about how to activate multiple trace files via ConfigTool. See pages 22-24 about how to activate standar out / error destination.

The second link shows how to use the new logging mechanisms from portal sources.

Both documents are somewhat fundamental, so I definitely suggest to work through them (even if nobody likes these new mechanisms).

Hope it helps

Detlev

Former Member
0 Kudos

10X Detlev, helpful as always, but can you please answer my first question, I couldn't find an answer for that in there...?

Former Member
0 Kudos

And why do I need to activate multiple trace files via ConfigTool? Can't I simply activate the standard out / error destination without activating multiple trace files?

detlev_beutner
Active Contributor
0 Kudos

Hi Roy,

> why do I need to activate multiple trace files

> via ConfigTool

I think you don't have to, but at the same time, I think you will like to. Otherwise you won't have much chances to catch you output (and even this hard enough) without the log viewer app. If you like it - be free, enjoy yourself (I don't know people who like it...).

About the log_configurator properties in ConfigTool and VisualAdmin: Just have a look at them, the properties you are able to set are totally different; the logging configuration is done via VisualAdmin; within ConfigTool you are only able to set Archive... settings (I haven't found any documentation about it).

Hope it helps

Detlev

Former Member
0 Kudos

Hello again,

Well, I have followed the steps at the document but I still can't see System.out.println's...

One thing though, I don't know if it is important, but I think it is worth mentioning: The document asks to put an Anonymous ListFormatter at the new Destination I configure for the System.out. I am adding it but after a server restaert it "disappears" from there. The only thing I could find at the defaultTrace log regarding it was this:

-


<!LOGHEADER[START]/>

<!HELP[Manual modification of the header may cause parsing problem!]/>

<!LOGGINGVERSION[1.5.3.7181 - 630_SP]/>

<!NAME[./log/defaultTrace.trc]/>

<!PATTERN[defaultTrace.trc]/>

<!FORMATTER[com.sap.tc.logging.ListFormatter]/>

<!ENCODING[Cp1252]/>

<!FILESET[0, 20, 10485760]/>

<!PREVIOUSFILE[defaultTrace.19.trc]/>

<!NEXTFILE[defaultTrace.1.trc]/>

<!LOGHEADER[END]/>

-


Is it necessary to put this Formatter in order this to work? If not, does anyone has an idea why I still can't see the pintln's?

Answers (3)

Answers (3)

Former Member
0 Kudos

I was having the same problem trying to get the System.out.println to write to a different file. I followed all the instructions set out in the "SAP Logging & Tracing API" document. But each time I did a restart the System --> Out Destination (I named it System_StandardOut) disappeared. So as mentioned in an earlier post, I changed the System --> out severity level to 'Info' instead of 'All'. I then executed a Web Dypro App that contained a line of System.out.println... code which triggered the J2EE engine to write to the new log file. I was then able to go back in and change the severity level back to 'All' and it continued writing to the new log file and the Destination remained.

Former Member
0 Kudos

Please change it from "ALL" to "Info".

Regards, Anilkumar

Former Member
0 Kudos

Regards, Anilkumar

Former Member
0 Kudos

Hey Anilkumar,

My System.out is set to "All" and my "ForceSingleTraceFile" is set to "YES", therefore I don't see how this post can help me...

Former Member
0 Kudos

Well, it looks like I see it now for some reason evrn though I haven't made any change at all.

My other question now is how to redirect the System.out to a separate file?

detlev_beutner
Active Contributor
0 Kudos

Hi Roy,

the disappearing of the System.out config we have also experienced. Maybe it's a bug, maybe it's by some (hard to understand...) design choice...

> how to redirect the System.out to a separate file

If you have switched off tracing into a single file, the file where you should find your System.out.println's is defined within the corresponding log Destination (under: Pattern), see Logging & Tracing PDF, page 23.

Hope it helps

Detlev

Former Member
0 Kudos

Hi,

see also SAP Note 733903.