[
https://issues.apache.org/jira/browse/LOG4J2-1676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15647309#comment-15647309
]
Ralph Goers commented on LOG4J2-1676:
-------------------------------------
My recollection is that if the Throwablle is part of ParameterizedMessage
getThrowable was called to add it to the LogEvent.
> Use Message.getThrowable() in log(Message) methods
> --------------------------------------------------
>
> Key: LOG4J2-1676
> URL: https://issues.apache.org/jira/browse/LOG4J2-1676
> Project: Log4j 2
> Issue Type: Bug
> Affects Versions: 2.5, 2.6, 2.7
> Reporter: Joern Huxhorn
>
> All {{log(Message)}} methods should use {{Message.getThrowable()}}, e.g.
> {code:java}
> public void debug(final Message msg) {
> logIfEnabled(FQCN, Level.DEBUG, null, msg, msg != null ?
> msg.getThrowable() : null);
> }
> {code}
> instead of the current
> {code:java}
> public void debug(final Message msg) {
> logIfEnabled(FQCN, Level.DEBUG, null, msg, null);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]