开发者

how to turn off tomcat5 'session expire' log messages?

I've been trying to turn off these excessive log messages without success.

 INFO   | jvm 1    | 2010/08/19 14:36:30 | DEBUG [ContainerBackgroundProcessor[StandardEngine[Catalina]]] (ManagerBase.java:677) - Start expire sessions StandardManager at 1282242开发者_Python百科990088 sessioncount 0
 INFO   | jvm 1    | 2010/08/19 14:36:30 | DEBUG [ContainerBackgroundProcessor[StandardEngine[Catalina]]] (ManagerBase.java:685) - End expire sessions StandardManager processingTime 0 expired sessions: 0

I added the following line to my app's WEB-INF/logging.properties file.

org.apache.catalina.session.ManagerBase.level=WARNING

Is this right? Is there somewhere else that I need to put it?


Try the following under Tomcat/conf/logging.properties:

org.apache.catalina.session.ManagerBase.level = INFO

And as mentioned, verify that this is not being overwritten in your custom log4j.properties file.

This has worked for our team with Tomcat v6.37 and log4j1.2.13.jar.


From the source code of ManagerBase.java, that seems to be the right setting

protected Log log = LogFactory.getLog(ManagerBase.class);
....
 if(log.isDebugEnabled())
  log.debug("Start expire sessions " 
      + getName() + " at " + timeNow + " sessioncount " + sessions.length);

I wonder if the logging.properties in the TOMCAT_HOME/conf/ is overriding the one in the WEB-INF

Can you change it there as well?


I know this is old but I put this in my logback.xml and it stopped the messages:

<logger name="org.apache.catalina.session.ManagerBase">
        <level value="INFO" />
</logger>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜