------------------------------------------------------------------------------------------------
....      
<appender name="appenderName" type="log4net.Appender.FileAppender">
            <param name="File" value="log-data\\my.log" />
            <param name="AppendToFile" value="true" />
            <layout type="log4net.Layout.PatternLayout">
                <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n" />
            </layout>
            <filter type="log4net.Filter.StringMatchFilter">
                <stringToMatch value="Global" />
            </filter>
            <filter type="log4net.Filter.LevelMatchFilter">
                <levelToMatch value="ERROR" />
            </filter>
            <filter type="log4net.Filter.DenyAllFilter" />
        </appender>
...
------------------------------------------------------------------------------------------------
I'm using release 1.2.10 with compilan target .net 1.1,  and I found a strange behaviour with the previous filter chain, but maybe my interpretation was wrong...  : in previous config-snippet I configured an appender (a FileAppender) that will log messages or events into a file, IFF the message contains the string "Global"  AND  the log-level is "ERROR"  (i.e. :   only calls to  log.Error  or log.ErrorFormat will be logged.   Is it right?

In my example, I see that the second filter does not filter .... :-(   The behaviour is exactly as it is not present in the config snippet.

Any help ?

Reply via email to