[logback-user] Inconsistency in printing Throwable instances?

ceki ceki at qos.ch
Mon Jul 16 23:02:17 CEST 2012


Hi Abraham,

Can you provide an example of the difference?
-- 
Ceki
http://tinyurl.com/proLogback

On 16.07.2012 22:32, Abraham Lin wrote:
> 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





More information about the Logback-user mailing list