logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ferenc Toth" <ft...@eu.infobal.com>
Subject RE: logs duplicated: INFO & DEBUG
Date Wed, 04 Feb 2004 15:52:02 GMT
> From: Stephane Nicoll [mailto:snicoll@kiala.com] 
> I am interested in 
> 1/ Is it possible to log stuff with level INFO in one file 
> and exactly the
> same plus DEBUG messages in another file?

As far as I know you have to use a filter to get this, and this means, you'll
need an xml config file. But that's pretty easy. Quick sketch to start with:

	<appender name="debug" class="whatever">
		<filter class="org.apache.log4j.varia.LevelRangeFilter">
			<param name="LevelMax" value="DEBUG" />
		some layout

	<appender name="everythingelse" class="whatever2">

		<priority value="debug"/>
		<appender-ref ref="debug"/>
		<appender-ref ref="everythingelse"/>

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

View raw message