logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Erskine <michael.ersk...@ketech.com>
Subject RE: How can I write a custom appender to supports Throwable as a second parameter?
Date Tue, 29 Sep 2009 08:13:46 GMT
If your Appender inherits from  a WriterAppender then it tacks the Throwable on the end of
the message anyway (because it already has somewhere sensible to put it and the PatternLayout
doesn't deal with it). If you don't want to do this and you want the Throwable info in your
Appender (NB: costly to collect) call LoggingEvent.getThrowableStrRep() and handle it however
you like.

Regards,
Michael Erskine.

> -----Original Message-----
> From: Alexander Spitzer [mailto:aspitzer@gmail.com]
> Sent: 28 September 2009 20:58
> To: Log4J Users List
> Subject: Re: How can I write a custom appender to supports Throwable as a
> second parameter?
>
> hmmm.. so does this mean that if I want to define my own pattern
> layout, it is not possible?
>
> -alex spitzer

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