if the first filter delivers DENY or ACCEPT, then the second filter is not 
called. if the return value would be NEUTRAL, also the second filter is called.
I'm not shure, but can't you use regular expression in one filter (or'd)?

Heri

> -----Original Message-----
> From: Praveen Kumar Hasthalapuram [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 10, 2006 5:18 PM
> To: [email protected]
> Subject: How to apply multiple filters to single appender
> 
> 
> How can we apply multiple filters (more than one filter) to 
> single appender?
> 
> I have a custome filter(StringMatchFilter), which will filter 
> based on given
> string.
> 
> I have configured as given below. but filter is happening on 
> only first
> filter, second filter is ignored.
> But, If i use different appenders it is working.
> 
> <appender name="A1" class="org.apache.log4j.RollingFileAppender">
>         <param name="File" value="file1.log"/>
>         <param name="Append" value="true"/>
>         <param name="MaxFileSize" value="10MB"/>
>         <layout class="org.apache.log4j.PatternLayout">
>             <param name="ConversionPattern" 
> value="%d{yyyy-MM-dd HH:mm:ss}
> [%p] %m%n"/>
>         </layout>
> 
>  <!-- To filter with string "SNMP"  -->
>  <filter class="com.cisco.nettools.logger.filters.StringMatchFilter">
>      <param name="stringToMatch" value="SNMP"/>
>      <param name="matchReturnValue" value="accept"/>
>      <param name="noMatchReturnValue" value="deny"/>
>    </filter>
> 
>  <!-- To filter with string "PING"  -->
> 
>    <filter 
> class="com.cisco.nettools.logger.filters.StringMatchFilter">
>      <param name="stringToMatch" value="PING"/>
>      <param name="matchReturnValue" value="accept"/>
>      <param name="noMatchReturnValue" value="deny"/>
>    </filter>
> 
> </appender>
> 
> Thanks In Advance,
> Praveen
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to