You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Jason R Briggs <ja...@lateralnz.com> on 2005/01/20 04:29:23 UTC

LevelMatchFilter configuration problem

Hi All

This is probably a dumb question, but I haven't been able to find an 
answer in the archives so far.  I have the following configuration for 
an appender:

  <appender name="audit" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="Append" value="true" />
    <param name="File" value="audit.log" />
    <param name="DatePattern" value="'.'yyyy-MM-dd" />
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d [%c] %m%n" />
    </layout>
    <filter class="org.apache.log4j.varia.LevelMatchFilter">
      <param name="LevelToMatch" 
value="AUDIT#com.lateralnz.common.rest.audit.AuditLevel" />
      <param name="AcceptOnMatch" value="true"/>
    </filter>
    <filter class="org.apache.log4j.varia.DenyAllFilter" />
  </appender>

If I remove the DenyAllFilter then audit.log receives all messages, 
-including- those flagged with my custom level.  Add it back in, and it 
gets nothing.... nada... zip.... bupkiss.

I've been staring at the darn thing for ages trying to see something I'm 
doing wrong, but I damned if I can see where I'm going wrong....

Anyone have any ideas?

Thx
J

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