【问题标题】:Disable atomikos logging from catalina.out从 catalina.out 禁用 atomikos 日志记录
【发布时间】:2013-01-31 18:40:16
【问题描述】:

我想将 atomikos 日志级别设置为高于 INFO。 Tomcat 的 catalina.out 日志文件写入了许多 INFO 消息,导致事务需要很长时间才能完成。

在启动过程中,catalina.out 包含:

18:11:51,481  INFO [main] AbstractUserTransactionService:16 - USING com.atomikos.icatch.console_log_level = WARN

在事务期间,多次将以下内容写入catalina.out。

18:12:05,072  INFO [http-8080-1] CompositeTransactionImp:16 - registerSynchronization ( com.atomikos.jdbc.AtomikosConnectionProxy$JdbcRequeueSynchronization@7b60ad0 ) for transaction 127.0.0.1.tm0000100018  
18:12:05,072  INFO [http-8080-1] AtomikosConnectionProxy:16 - atomikos connection proxy for Pooled connection wrapping physical connection org.postgresql.jdbc4.Jdbc4Connection@37955233: calling prepareStatement...  
18:12:05,073  INFO [http-8080-1] AtomikosConnectionProxy:16 - atomikos connection proxy for Pooled connection wrapping physical connection org.postgresql.jdbc4.Jdbc4Connection@37955233: isClosed()...  
18:12:05,073  INFO [http-8080-1] AtomikosConnectionProxy:16 - atomikos connection proxy for Pooled connection wrapping physical connection org.postgresql.jdbc4.Jdbc4Connection@37955233: calling getWarnings...  
18:12:05,073  INFO [http-8080-1] AtomikosConnectionProxy:16 - atomikos connection proxy for Pooled connection wrapping physical connection org.postgresql.jdbc4.Jdbc4Connection@37955233: calling clearWarnings...  
18:12:05,073  INFO [http-8080-1] AtomikosConnectionProxy:16 - atomikos connection proxy for Pooled connection wrapping physical connection org.postgresql.jdbc4.Jdbc4Connection@37955233: close()...

我已尝试在 conf/logging.properties 中将 atomikos 级别设置为 WARN,但仍在写入 INFO 日志。我什至已经从 logging.properties 中删除了 ConsoleHandler,但是 catalina.out 仍在被写入。

在我的 webapp 目录中,我已更新 log4j.xml 以包含以下内容,但仍会获取日志。

<logger name="com.atomikos">
    <level value="ERROR"/>
</logger>

【问题讨论】:

    标签: tomcat logging atomikos


    【解决方案1】:

    在 Atomikos 3.7 中,设置以下系统属性:

    com.atomikos.icatch.console_log_level=WARN
    

    请参阅 this link 了解所有 Atomikos JTA 属性

    从 Atomikos 3.8 开始,通过 SLF4j 改进了与 log4j 的集成。

    configuring the logs

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-03-02
      • 2017-08-01
      • 2018-07-17
      • 2011-06-22
      • 2015-04-21
      • 2015-02-01
      • 2012-09-21
      • 1970-01-01
      相关资源
      最近更新 更多