如何完全禁用log4net的 [英] How to completely disable log4net

查看:357
本文介绍了如何完全禁用log4net的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个.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/>

<一个href="http://logging.apache.org/log4net/release/faq.html">http://logging.apache.org/log4net/release/faq.html

这篇关于如何完全禁用log4net的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆