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:[email protected]] Sent: Friday, June 05, 2009 2:09 PM To: [email protected] 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: [email protected] For additional commands, e-mail: [email protected]
