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 Re: problem with LevelRangeFilter - don't work well (XML)
Date Wed, 30 Nov 2005 16:14:22 GMT
Hi,
well, the problem with the filter continues. I'm not able to filter the 
loggings to different files.
The basic question are:
* Is the filter implemented in Log4cxx?
* Does somebody have some experience with the Filter and might send me 
an example?!

In my application I'm using the Macro (e.g. LOG4CXX_DEBUG ) for logging. 
  Might the filter be ignored because the Macro calls 
logger->forcedLog(...)?

Has somebody experience with the filtering?

regards,

Rainer

Rainer Schuetze schrieb:
> 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
> 
> 


Mime
View raw message