cancel
Showing results for 
Search instead for 
Did you mean: 

Logging : without the api

Former Member
0 Kudos

Hi,

how can I see the logs output by a J2EE application that doesn't use the logging api ? That is, it uses simple System.out.println and System.err.println

For example, if I install an application that uses log4j as a logging framework.

Thank you.

Thierry

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

There is no managers folder in my installation (WAS 6.40) and when I look through all the output files in the log directories of my server, I don't find the output of my System.out statements.

Do I have to set some parameters somewhere in order for the system.out statements to end up in log files ?

Thanks

SidBhattacharya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Use the import com.sap.tc.logging.*

private static final com.sap.tc.logging.Location logger =

com.sap.tc.logging.Location.getLocation(XXX.class);

logger.setEffectiveSeverity(Severity.ALL);

logger.addLog(new ConsoleLog());

You should now see the Sys outs in the log files.

daniel_appelt
Explorer
0 Kudos

If you want to use a properties file (normally called log4j.properties) to determine characteristics of the log you have to put it in a place where log4j can find it.

If you run the SAP J2EE engine as a cluster this is most likely the directory j2ee/cluster/server...

If you still have problems I would reccommend to read the section "Default Initialization Procedure" of

http://logging.apache.org/log4j/docs/manual.html .

darrell_merryweather
Active Contributor
0 Kudos

Hi

You can see the output in the managers/console_logs directory in the _output file. However, if you use the log4j you can specify where the log file resides.

I hope this helps

D