You need to use a LevelMatchFilter on your appender to restrict the
events to a single level. For example:
<appender name="ConsoleInfoOnly" type="log4net.Appender.ConsoleAppender"
>
<layout type="log4net.Layout.PatternLayout" value="%date %-5level
%logger - %message%n" />
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="INFO" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
</appender>
Nicko
> -----Original Message-----
> From: Shaily Goel [mailto:[EMAIL PROTECTED]
> Sent: 21 April 2005 06:13
> To: [email protected]
> Subject: Severity Threshold
>
> Currently the way log4net works is :
>
> If I have set the File Appender threshold to "Info" then it
> will receive all those messages which has severity greater or
> equal to Info. For e.g It will receive Error and Warning
> messages also if threshold of Fileappender is set to "Info".
>
> Is there any way by which I can say "Only Info" messages
> should be logged by FileAppender. Rest all other messages(may
> be Error/Warning etc) should be discarded.
>
> Thanks
> Shaily
>