R
RPMcNally
Hello all,
I have a log4j.xml that contains three appenders. One uses a
LevelRangeFilter and two use LevelMatchFilters. The LevelRangeFilter
works correctly but the LevelMatchFilters are logging all levels. Can
anybody point me in the right direction? My file is listed below.
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="QUERIES"
class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="/usr/local/solid/log/queries.log"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MMM-dd
HH:mm:ss} %-5p %c - %m%n%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelMatchFilter">
<param name="LevelToMatch" value="INFO"/>
</filter>
</appender>
<appender name="WARNINGS"
class="org.apache.log4j.DailyRollingFileAppender">
<param name="File"
value="/usr/local/solid/log/warnings.log"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MMM-dd
HH:mm:ss} %-5p %c - %m%n%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelDonkeyFilter">
<param name="LevelToMatch" value="WARN"/>
</filter>
</appender>
<appender name="ERRORS"
class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="/usr/local/solid/log/errors.log" />
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MMM-dd
HH:mm:ss} %-5p %c - %m%n%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="ERROR"/>
<param name="LevelMax" value="FATAL"/>
</filter>
</appender>
<category name="solid" additivity="false">
<priority value="info"/>
<appender-ref ref="QUERIES"/>
<appender-ref ref="WARNINGS"/>
<appender-ref ref="ERRORS"/>
</category>
</log4j:configuration>
I have a log4j.xml that contains three appenders. One uses a
LevelRangeFilter and two use LevelMatchFilters. The LevelRangeFilter
works correctly but the LevelMatchFilters are logging all levels. Can
anybody point me in the right direction? My file is listed below.
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="QUERIES"
class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="/usr/local/solid/log/queries.log"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MMM-dd
HH:mm:ss} %-5p %c - %m%n%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelMatchFilter">
<param name="LevelToMatch" value="INFO"/>
</filter>
</appender>
<appender name="WARNINGS"
class="org.apache.log4j.DailyRollingFileAppender">
<param name="File"
value="/usr/local/solid/log/warnings.log"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MMM-dd
HH:mm:ss} %-5p %c - %m%n%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelDonkeyFilter">
<param name="LevelToMatch" value="WARN"/>
</filter>
</appender>
<appender name="ERRORS"
class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="/usr/local/solid/log/errors.log" />
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MMM-dd
HH:mm:ss} %-5p %c - %m%n%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="ERROR"/>
<param name="LevelMax" value="FATAL"/>
</filter>
</appender>
<category name="solid" additivity="false">
<priority value="info"/>
<appender-ref ref="QUERIES"/>
<appender-ref ref="WARNINGS"/>
<appender-ref ref="ERRORS"/>
</category>
</log4j:configuration>