logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Brown <Matt.Br...@citrixOnline.com>
Subject RE: Logging to console and file at different levels
Date Fri, 05 Jun 2009 21:02:42 GMT
You can try adding a threshold to the console appender:

log4j.appender.CONSOLE.threshold = WARN

This should tell the console appender to ignore any log messages it might receive below the
WARN level.

 

-----Original Message-----
From: Bai Shen [mailto:baishen.lists@gmail.com] 
Sent: Friday, June 05, 2009 2:09 PM
To: log4j-user@logging.apache.org
Subject: Logging to console and file at different levels

I have a web service using Axis and running on Tomcat.  I'm using slf4j piping to log4j. 
I have the root logger set to WARN and to output to a file and the console.  I also have a
logger setup for just my application set to INFO logging to the file.  I had to turn off addivity
in order to get it to not log to the console.

What I'd like to do is have my application still log any WARN messages in the console as well
as the file.  But I don't want any of the INFO messages in the console.  How do I configure
my setup to do that?

TIA.

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