You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Carl Bacher <cb...@wellinx.com> on 2001/12/10 17:47:45 UTC
Turning Stack Traces on/off
Is there anyway to turn stack traces on or off via the config file?
That is, if I log an error w/an exception using
cat.error("Oops", exception);
Can I set up the config file so the stack trace is only provided if I
want it to?
I was considering something like this:
if (cat.isDebugEnabled())
cat.error("Oops", exception);
else
cat.error("Oops");
which would only show exception stack traces in Debug mode.
Thanks, Carl