logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jimski <jimk...@gmail.com>
Subject Suppressing stacktrace output
Date Wed, 19 Mar 2008 15:58:51 GMT


I've defined two appenders for my application: a console and a file
appender.  Throughout my code I've been using the convention of logging a
message along with a throwable so that I could output the stacktrace for
diagnostic purposes.  

I'd like to suppress the stacktrace output for the console appender but
can't find any way to do that that allows me to keep all my logging
statements as is.  I found one unacceptable workaround where, for each
logged exception I could do the following:

log.info("Some custom message");
log.debug("Some custom message", e);

and then set up appropriate filter levels on each appender.  

Does someone have a solution that would allow me to simply turn off
stacktrace output for a specific appender?



View this message in context: http://www.nabble.com/Suppressing-stacktrace-output-tp16145551p16145551.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

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

View raw message