[logback-user] Inconsistency in printing Throwable instances?

Abraham Lin abraham.lin at post.harvard.edu
Mon Jul 16 22:32:49 CEST 2012


Hi,

In comparing the outputs of Throwable#printStackTrace and logback, I found
an inconsistency in how the Throwable instances are printed. While the
former delegates to the Throwable instance's #toString method, the latter
(partially) re-implements the default implementation in Throwable, which
means that data contained in the #toString methods of Throwable subclasses
is discarded. While this is easy to work around in my own code, there is
still a problem when working with third-party libraries.

Is there a configuration option that would allow me to specify my own
IThrowableProxy implementation? (I couldn't find any pages describing the
extension points and how to activate them.) Or would it be more appropriate
to modify the ThrowableProxyUtil class so that it behaves similarly to
#printStackTrace? Any ideas would be greatly appreciated.

Thanks in advance!

-Abraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120716/5a66ff3e/attachment.html>


More information about the Logback-user mailing list