I have a server deployed which is generating 'false positive' log4net ERROR 
events.  These should be changed to be WARN events so that they can be filtered 
out by a configuration change.  Unfortunately, deploying a patch to the server 
at this point in time means moving heaven and earth to get the support needed 
for QA and deployment.

What I would like to do is to devise a change to the log4net configuration 
which allows filtering OUT of the specific events that are 'false positive'.  
Generally, it seems that the <filter> option on an appender indicates what IS 
to be included, not what should be excluded.

How can I design an appender with a string filter that excludes all events that 
contain a particular string, but allows all other events to fall through and be 
reported.  In the following example, I wish to filter OUT all events that 
contain the string ="Zero Length Request Received" and  leave everything else.

In the SDK, there is an option named:  AcceptOnMatch.  Can that be incorporated 
into this type of filter to get the desired effect?

Thanks,

Ken Parrish
Gomez, Inc.

<filter type="log4net.Filter.StringMatchFilter">
    <!-- ??? will this work ???  -->
    <stringToMatch value="Zero Length Request Received" AcceptOnMatch="false" />
</filter>

Reply via email to