logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James A. N. Stauffer" <stauffer.ja...@gmail.com>
Subject Re: Suppressing stacktrace output
Date Wed, 19 Mar 2008 23:24:51 GMT
I think the layout determines if the stack trace is logged.  How are
you configuring the console appender?

On Wed, Mar 19, 2008 at 9:58 AM, jimski <jimkski@gmail.com> wrote:
>
>  Hi-
>
>  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?
>
>  Thanks,
>
>  Jim
>
>  --
>  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
>
>



-- 
James A. N. Stauffer http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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