Paul, Your filter configuration looks good to me. The StringMatchFilter will only match the value against the text of the message logged and not any of the other fields, e.g. the logger name or the value of the NDC etc..
Nicko > -----Original Message----- > From: Paul Ingles [mailto:[EMAIL PROTECTED] > Sent: 14 January 2005 18:06 > To: [email protected] > Subject: Problems with filters > > Hi, > > 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" /> > </layout> > <filter type="log4net.Filter.StringMatchFilter"> > <stringToMatch value="consort" /> > </filter> > <filter type="log4net.Filter.DenyAllFilter" /> > </appender> > > So that anything with 'consort' will be allowed through, and > everything else dropped. > > 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. > > Thanks, > Paul > >
