Alexander Spitzer wrote:
> log4j does not appear to append the stack trace onto the event before
> passing it onto my appender.  Here is a quick test I just did:
>
>     private void init_vars()
>     {
>         forcedLayout=new PatternLayout("%p %c %m");
>         init=true;
>     }
>   
This took me surprise... the clue was that the pattern code was "m" for
message, which didn't seem to cover it.

"The PatternLayout does not handle the throwable contained within
LoggingEvents
<http://www.docjar.com/docs/api/org/apache/log4j/LoggingEvent.html> .
Thus, it returns |true|."

http://www.docjar.com/docs/api/org/apache/log4j/PatternLayout.html#ignoresThrowable

Simon

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to