Is there a way to have the log4net configuration ignore a specific class? For example, we generally create a log in every class. Similar to this:
private sta
I would suggest using Filters as well. However, since I struggled finding the whole picture when I was trying to implement the filter I am posting a sample snippet of the Configutation file
I created which points out where filters go.
The filter you are going for in this case would be
log4net.Filter.LoggerMatchFilter ----(Matches against a the start of the logger name.)
Hint: In the config
file for Log4Net it is important where you put your tags and the priority of them actually matters. So in this case
tag comes after the
opening tag and before it's
tag.
In this technique you can have multiple appenders
which you can redirect the logging results of a specific logger to a separate appender
instead of ignoring them. Such as one appender
for all logs and one for the filtered out logs for a specific class
.