logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ron Grabowski (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LOG4NET-137) log4net.Filter.LevelMatchFilter does not work anymore
Date Sat, 14 Jun 2008 14:15:45 GMT

     [ https://issues.apache.org/jira/browse/LOG4NET-137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ron Grabowski updated LOG4NET-137:
----------------------------------

    Fix Version/s: 1.2.11
         Assignee: Ron Grabowski

> log4net.Filter.LevelMatchFilter does not work anymore
> -----------------------------------------------------
>
>                 Key: LOG4NET-137
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-137
>             Project: Log4net
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 1.2.10
>            Reporter: Benjamin Peikes
>            Assignee: Ron Grabowski
>             Fix For: 1.2.11
>
>
> 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{yyyyMMdd:HHmmss.fffff} [%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{yyyyMMdd:HHmmss.fffff} [%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{yyyyMMdd:HHmmss.fffff} [%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{yyyyMMdd:HHmmss.fffff} [%t] %-5p %c
%x - %m%n" />
> 			</layout>
> 		</appender>					
> 	</log4net>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message