[ 
https://issues.apache.org/jira/browse/LOG4J2-1676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15647111#comment-15647111
 ] 

Mikael Ståldal commented on LOG4J2-1676:
----------------------------------------

I think you did not get my question. I wonder about the reason for adding 
{{Message.getThrowable()}} in the first place. 

Maybe [~garydgregory] can answer, he made committ 
64f7ec1c100655bc04188e19c932a4d86a3552b2 back in 2012. JIRA issue 
https://issues.apache.org/jira/browse/LOG4J2-133 does not answer it.

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

Reply via email to