I have to disable only trace level in my project using log4net. I googled it but it didn't help me. So can anyone help me out how to turn off only trace level as well as all particular level turn off logging in log4net?
You can use LevelMatch filter with AcceptOnMatch = false. That way it would exclude selected level from logging.
<filter type="log4net.Filter.LevelMatchFilter">
<AcceptOnMatch value="false" />
<LevelToMatch value="TRACE" />
</filter>
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