logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Schuetze <schue...@geoinform.fh-mainz.de>
Subject problem with LevelRangeFilter - don't work well (XML)
Date Thu, 24 Nov 2005 11:17:25 GMT
Hi,

I tried to filter some important logging events in different files. 
However, the appender logs all levels in the file. Actually, I'm not 
sure which parameter I have to set within the filter element. I suppose 
the parameter for min & max are named wrong.
Is the Filter objective full implemented in Log4cxx yet?

> 
>   <appender name="ERROR" class="org.apache.log4j.FileAppender">
>     <param name="File"   value="./log/error.log" />
>     <param name="Append" value="false" />
> 
>     <layout class="org.apache.log4j.PatternLayout">
>       <param name="ConversionPattern"
>           value="%5p [%t] %5rms - (%d{%H:%M:%S}) (%5L) %c - %m%n" />
>     </layout>
> 
>      <filter class="org.apache.log4j.varia.LevelRangeFilter">
>       <param name="MatchReturnValue" value="accept"/>
>       <param name="LogLevelMin" value="warn"/>
>       <param name="LogLevelMax" value="fatal"/>
>     </filter>
> 
>   </appender>
> 
>   <root>
>     <priority value ="debug" />
>     <appender-ref ref="ERROR" />
>   </root>

I also tried the filter XML-example of the cvs-project which uses the 
LevelMatchFilter (see below), but I wasn't able to filter the log. Do I 
miss something?

>     <filter class="org.apache.log4j.filters.LevelMatchFilter">
>       <param name="MatchReturnValue" value="accept"/>
>       <param name="NoMatchReturnValue" value="deny"/>
>       <param name="LevelToMatch" value="warn"/>
>     </filter>

Thanks for your help,

Rainer


-- 
Rainer Schuetze

i3mainz - Fachhochschule Mainz
Holzstrasse 36
55116 Mainz
Germany

Tel: +49 (0)6131 2859 682
Fax: +49 (0)6131 2859 699
schuetze@geoinform.fh-mainz.de
http://www.i3mainz.fh-mainz.de


Mime
View raw message