【发布时间】: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>
【问题讨论】: