Skip to content

Prevent Log File Creation from Log4Net

ashutosh kumar gupta

Asked Nov 29, 2016, 9:34 PM EST2 answers
Share
LinkedInX
I am using the Log4Net utility for logging the windows application log. I want some kind of configuration settings through which the log files are not created.
 
I have used the below configuration but from this configuration log files are still created of 0KB. I want that the log files should not be created.
 
<root>
<level value="OFF" />
<appender-ref ref="InfoRollingLogFileAppender" />
<appender-ref ref="ErrorRollingLogFileAppender" />
<appender-ref ref="trace" />
</root>
 
Please help. 
 

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Suthish Nair
    0
    There seems a property named threshold that you can set as OFF in config file. Refer Log4Net support documents. 
    0
  • 0
    The file is still created of 0KB. I want that should not create.Please help if there is any option for that.
    0