logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Q: how to prevent log4j from cutting off stack traces?
Date Fri, 12 Feb 2010 05:16:33 GMT
Unless the user has configured otherwise, log4j just outputs the results of Exception.printStackTrace(Writer).
 Any truncation occurs within the implementation of printStackTrace, likely way back in the
JVM and could be controlled by any configuration supported by the JVM.  However, I was not
able to find any command line arguments or similar to tweak that behavior.

In the SVN HEAD, the throwable renderer is configurable and EnhancedThrowableRenderer uses
Exception.getStackTrace instead which may not be affected by stack trace truncation.



log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer

or

<throwableRenderer class="org.apache.log4j.EnhancedThrowableRenderer"/>

to log4j.properties or log4j.xml respectively.

See http://issues.apache.org/bugzilla/show_bug.cgi?id=45721 for the backstory.



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