我想将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,但信息日志仍在写入中。我甚至从logging.properties中删除了ConsoleHandler,但仍在写入catalina.out。
在我的webapp目录中,我更新了log4j.xml以包含以下内容,但仍然获得了日志。
<logger name="com.atomikos">
<level value="ERROR"/>
</logger>发布于 2013-02-16 22:25:57
在Atomikos 3.7中,设置以下系统属性:
com.atomikos.icatch.console_log_level=WARN有关所有Atomikos JTA属性,请参见this link
从Atomikos3.8开始,通过SLF4j大大改进了与log4j的集成。
请参阅configuring the logs
https://stackoverflow.com/questions/14900629
复制相似问题