[logback-user] Getting class packaging information with IThrowableRenderer
ceki
ceki at qos.ch
Wed Jun 20 18:00:26 CEST 2012
Hi Thilo,
Here is a way how to find the information with what you already know.
You know that %xEx prints packaging data. If you look in PatternLayout
[1], you'll see that on line 113, the string "xEx" is mapped to
ExtendedThrowableProxyConverter [2]. This class derives from
ThrowableProxyConverter and overrides the extraData() method. In line
25, you'll see that it invokes the subjoinPackagingData() method in
ThrowableProxyUtil to fill in packaging data. See [3] for the
implementation of this method.
Let us know if this puts you on the right track.
--
Ceki
http://twitter.com/#!/ceki
[1] http://logback.qos.ch/xref/ch/qos/logback/classic/PatternLayout.html#113
[2]
http://logback.qos.ch/xref/ch/qos/logback/classic/pattern/ExtendedThrowableProxyConverter.html
[3]
http://logback.qos.ch/xref/ch/qos/logback/classic/spi/ThrowableProxyUtil.html#108
On 20.06.2012 17:16, Thilo-Alexander Ginkel wrote:
> Hi there,
>
> I very much like the class packaging information displayed for a
> stacktrace with the %xEx{depth} pattern.
>
> Due to its IThrowableRenderer mechanism, using %xEx{depth} with an
> HTMLLayout does not seem to make much sense, though. OTOH, the
> DefaultThrowableRenderer does not seem to emit this information by
> default (nor does it seem to be configurable).
>
> Is there a way to get this class packaging information for information
> rendered by a HTMLLayout's IThrowableRenderer without reinventing the
> wheel? If the latter is needed, where is the code implemeting the
> class packaging information retrieval for %xEx{depth} located?
>
> Thanks,
> Thilo
More information about the Logback-user
mailing list