Websphere Application Debug logging

孤人 提交于 2019-12-11 02:06:03

问题


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?


回答1:


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.




回答2:


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

*=finest: com.myapplication.*=all


来源:https://stackoverflow.com/questions/3310604/websphere-application-debug-logging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!