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.
log4net is a port of the excellent Apache log4j™ framework to the Microsoft® . NET runtime. We have kept the framework similar in spirit to the original log4j while taking advantage of new features in the . NET runtime.
You can configure the log4net. config file to create log files. The file is located in the webroot\App_data directory of the installation.
dll in Solution. Log4net is an open-source project based on the work of many authors. It allows the developer to control what log statements are output with arbitrary granularity. It is fully configurable at runtime using external configuration files.
to disable all logging messages you can set Logging level to 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 threshold="OFF" />
http://logging.apache.org/log4net/release/faq.html
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 threshold="OFF" />
Refer this: How do I completely disable all logging at runtime?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With