如何使用log4j关闭注销? [英] How do I turn logging off using log4j?
本文介绍了如何使用log4j关闭注销?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用具有log4j.xml配置的第三方库 - 关闭日志记录的最佳方法是什么?
I am using a third-party library which has a log4j.xml configuration - what's the best way to turn off the logging?
推荐答案
我认为所需要的只是将阈值参数设置为OFF
I think all that is required is to set the threshold parameter to OFF
<log4j:configuration threshold="OFF">
<root>
<priority value ="off" />
<appender-ref ref="console" />
<appender-ref ref="rolling-file" />
</root>
</log4j:configuration>
这篇关于如何使用log4j关闭注销?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文