我想将 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>