3

I am trying to get my web application deployed on Websphere 6.1 to display debug level logs.

Originally I was using log4j, but have changed all loggers to use commons logging since it seems this is supported by Websphere.

I have set the log level under Logging and Tracing > server1 > Change Log Detail Levels to:

*=info: com.myapplication.*=all

Unfortunately this only seems to display info level logs from my application in the SystemOut.log

The following shows up in the logs:

if (log.isInfoEnabled())
    log.info("End( messages[" + listMessages.size() + "] )");

But the following (from the same method) does not:

if (log.isDebugEnabled())
    log.debug("Start()");

I have not added any log config files to my war as I read that this was set up by Websphere.

Does anyone know how to get logging working correctly in Websphere?

2 Answers 2

5

To answer my own question, after looking around for an hour, it appears that debug and lower from commons logging are placed into the trace.log file.

Info logs are placed into the SystemOut.log file.

I was expecting debug to go to the SystemOut.log file as well, this is what was causing the confusion.

1
0

It looks like in WAS 6.1 finest is equivalent to debug, so I could set it like so:

*=finest: com.myapplication.*=all
1
  • Yip, it looks like all debug and below logs go to the trace.log file Jul 22, 2010 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.