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:aspit...@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-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to