Description
The following log4net configuration used to filter only FATAL messages to the event log. In version 1.2.10, this will send all messages to the EventLog. If I remove the LevelMatchFilter and replace it with a LevelRangeFilter which has a minLevel set to FATAL, the filtering occurs properly.
<log4net>
<root>
<level value="Info" />
<appender-ref ref="All" />
<appender-ref ref="Error" />
<appender-ref ref="EventLog" />
<!-- <appender-ref ref="Console" /-->
</root>
<appender name="EventLog" type="log4net.Appender.EventLogAppender" >
<param name="ApplicationName" value="SQLNotifyApp" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%d
[%t] %-5p %c %x - %m%n" />
</layout>
<filter type="log4net.Filter.LevelMatchFilter">
<param name="LevelToMatch" value="FATAL" />
</filter>
</appender>
<appender name="Error" type="log4net.Appender.RollingFileAppender">
<file value="SQLNotifyApp_Error.log" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<filter type="log4net.Filter.LevelMatchFilter">
<param name="LevelToMatch" value="ERROR" />
</filter>
<layout type="log4net.Layout.PatternLayout" >
<param name="conversionPattern" value="%d
[%t] %-5p %c %x - %m%n" />
</layout>
</appender>
<appender name="All" type="log4net.Appender.RollingFileAppender">
<file value="SQLNotifyApp_All.log" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout" >
<param name="conversionPattern" value="%d
[%t] %-5p %c %x - %m%n" />
</layout>
</appender>
<appender name="Console" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout" >
<param name="conversionPattern" value="%d
[%t] %-5p %c %x - %m%n" />
</layout>
</appender>
</log4net>