No, you aren't confused. When the EnhancedPatternLayout was incorporated from
Log4j 1.x it doesn't actually do that. In looking at the code it turns out the
WriterAppender is formatting the throwable, not the PatternLayout. That
behavior isn't correct. If you could create a Jira issue for this I'd be happy
to add it.
Ralph
On Dec 4, 2012, at 8:58 PM, Mikhail Kruk wrote:
> Hello,
>
> It appears that the default configuration for log4j2 (unlike log4j)
> does not include exception information when I invoke
> Logger.error("we are all doomed", ex);
> I only get "we are all doomed" and nothing about why.
> Do I have to explicitly add %e to all my patterns or am I confused?
>
> Thanks,
> m
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]