如何将Atomikos设置为不写入控制台日志?

问题描述:

Atomikos使用起来很冗长.似乎有很多事务管理器写到控制台的INFO消息(对我来说几乎不相关).假定用于控制消息传递 com.atomikos.icatch.console_log_level 的级别的transaction.properties中的设置似乎没有任何效果,因为即使将INFO设置为WARN(或ERROR),也是如此.消息仍被记录. com.atomikos和atomikos的log4j设置似乎也被忽略了. 是否有人设法通过Atomikos关闭控制台上的INFO日志?如何? 谢谢

Atomikos is quite verbose when used. There seems to be lots of INFO messages (mostly irrelevant for me) that the transaction manager writes out to the console. The setting in the transaction.properties that is suppose to control the level of messaging com.atomikos.icatch.console_log_level does not seem to have any effect, since even when set to WARN (or ERROR) the INFO messages are still logged. Also the log4j settings for com.atomikos and atomikos seem to be ignored. Does anyone manage to turn off the INFO logs on the console with Atomikos?. How? Thanks

彼得

我想出了一种方法.实际上,这非常简单,因为Atomikos使用集中化类来进行称为 com.atomikos.icatch.system.Configuration 的日志记录.记录实际上是使用 com.atomikos.diagnostics.Console 的实现来执行的,因此,我要做的就是取消注册所有默认控制台,并注册基于公共记录

I've figured out a way to do that. It is actually very simple since Atomikos uses a centralize class to do the logging called com.atomikos.icatch.system.Configuration. Logging is actually performed with implementations of com.atomikos.diagnostics.Console so all I had to do is to un-register all default consoles and register my own implementation that's based on commons logging