Websphere应用程序调试日志记录 [英] Websphere Application Debug logging

查看:553
本文介绍了Websphere应用程序调试日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将我的Web应用程序部署在Websphere 6.1上以显示调试级别日志.

最初我使用的是log4j,但是由于似乎Websphere支持此功能,因此已将所有记录器更改为使用公共记录.

我已在日志记录和跟踪">"server1">将日志详细信息级别更改为"下设置了日志级别:

*=info: com.myapplication.*=all

不幸的是,这似乎只显示了我在SystemOut.log中的应用程序中的信息级别日志

以下内容显示在日志中:

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

但是以下内容(通过相同的方法)没有:

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

当我读到它是由Websphere设置的时,我没有向战争添加任何日志配置文件.

有人知道如何在Websphere中使日志正常工作吗?

解决方案

要回答我自己的问题,环顾了一个小时后,看来将debug和commons日志中的内容放到trace.log文件中. >

信息日志放置在SystemOut.log文件中.

我还希望调试也进入SystemOut.log文件,这就是造成混乱的原因.

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?

解决方案

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.

这篇关于Websphere应用程序调试日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆