logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bender Heri" <HBen...@Ergonomics.ch>
Subject RE: Specifying logging levels independently
Date Thu, 01 Sep 2005 09:12:56 GMT
Of course you can do this.

Set either the level of the logger to the desired value:

        <level value="warning"/>

or set the threshold tag of an appender:

        <param name="Threshold" value="WARNING"/>

or define a filter withing an appender:

        <filter class="org.apache.log4j.varia.LevelRangeFilter">
            <param name="LevelMin" value="warn"/>
            <param name="LevelMax" value="fatal"/>
            <param name="AcceptOnMatch" value="false"/>
        </filter>

Heri

> -----Original Message-----
> From: Benjamin David [mailto:bdavid01@gmail.com]
> Sent: Thursday, September 01, 2005 10:48 AM
> To: log4j-user@logging.apache.org
> Subject: Specifying logging levels independently
> 
> 
> Hello,
>  I am currently using log4j and I have a new requirement for 
> specifying 
> logging levels independently,
> for instance, I would like to log only ERROR and WARNING.
> As far as I am aware log4j does not support this.
> Is a workaround available for this ?
>  Thanks,
> Ben
> 

---------------------------------------------------------------------
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