logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Filter not working
Date Fri, 03 Sep 2004 18:17:28 GMT

LevelMatchFilter returns NEUTRAL if there is no match. You need to add a 
DenyAll filter after the LevelMatchFilter.

Does that make sense?


At 07:00 PM 9/3/2004, you wrote:
>I have a filter set up like so:
>         <appender name="auditApp"
>class="org.apache.log4j.DailyRollingFileAppender">
>         <param name="File"
>value="/pti/projects/commons-audit/v1.0/conf/audit.log" />
>                 <param name="DatePattern" value="'.'yyyy-MM-dd"/>
>                 <layout
>class="com.ptilabs.commons.audit.AuditPatternLayout">
>                         <param name="ConversionPattern" value="%d [%t] %-5p
>%c - %m - %s%n"/>
>                 </layout>
>                 <filter class="org.apache.log4j.varia.LevelMatchFilter">
>                         <param name="LevelToMatch"
>value="audit#com.ptilabs.commons.audit.AuditLevel"/>
>                         <param name="AcceptOnMatch" value="true"/>
>                 </filter>
>         </appender>
>
>
>And a category:
>         <category name="com.ptilabs">
>                 <priority value="audit#com.ptilabs.commons.audit.AuditLevel"
>/>
>                 <appender-ref ref="auditApp" />
>         </category>
>
>But it seems to be letting everything through (Priority 'audit' is below
>DEBUG)..
>
>Can anyone see what I am doing wrong?
>
>I'm trying to get different appenders to be used based on level.
>
>Thanks...
>
>--
>Sloan

-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message