logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Ingles" <paul.ing...@centaur.co.uk>
Subject Problems with filters
Date Fri, 14 Jan 2005 18:05:44 GMT

Thank you for the suggestions about the configuration, I'm now up and
running. I've placed the configuration into a separate log4net file, and
then load this within my type's static constructor using the
DOCConfigurator.ConfigureAndWatch method.

However, I'm now attempting to filter the content displayed through the
ConsoleAppender. Although I want all levels displayed, I only want those
with certain keywords to appear.

My ConsoleAppender appender element looks as follows:

	<appender name="ConsoleAppender"
type="log4net.Appender.ConsoleAppender" >
		<layout type="log4net.Layout.PatternLayout">
			<param name="ConversionPattern" value="%d [%t] %-5p
%c [%x] %X{auth} - %m%n" />
		<filter type="log4net.Filter.StringMatchFilter">
			<stringToMatch value="consort" />
		<filter type="log4net.Filter.DenyAllFilter" />

So that anything with 'consort' will be allowed through, and everything else

However, despite the ConfigureAndWatch call definitely being made, it
appears as if the changes aren't picked up.

Again, apologies if I've completely misunderstood something.


View raw message