如何完全禁用log4net的log4net

2023-09-03 04:50:56 作者:妖辞

我在一个.NET Web应用程序一个log4net的。但我想完全禁用它。有可在为了达到这个被设定在web.config任何配置设置。

I have a log4net in one .net web application. But i want to completely disable it. Is there any configuration setting that can be set in the web.config in order to achieve this.

推荐答案

禁用所有消息记录,您可以设置日志记录级别为OFF:

to disable all logging messages you can set Logging level to OFF:

设置阈值的层次结构趋于平稳将禁用所有   从层次记录。这可以在log4net的做   通过设置门槛属性上的log4net的配置文件   配置元素为OFF。例如:

Setting the Threshold on the Hierarchy to Level OFF will disable all logging from that Hierarchy. This can be done in the log4net configuration file by setting the "threshold" attribute on the log4net configuration element to "OFF". For example:

< log4net的阈值=OFF/>

http://logging.apache.org/log4net/release/faq.html

 
精彩推荐
图片推荐