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

Steve Loughran commented on HADOOP-10571:
-----------------------------------------

# I've found the combo of log(text+exception.toString, exception) handy for 
those situations where the log gets lost
# This could be an opportunity for SLF4J-ing those classes which are being 
patched. That's initially just changing the import & log assignment, -- but for 
changed lines lets us go from {{log.info("text" + a + " " + ex, ex)}} to 
{{log.info("text {}, {}", a, ex, ex}} and have the expansion only done when 
needed

> Use Log.*(Object, Throwable) overload to log exceptions
> -------------------------------------------------------
>
>                 Key: HADOOP-10571
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10571
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>            Reporter: Arpit Agarwal
>            Assignee: Arpit Agarwal
>              Labels: BB2015-05-TBR
>         Attachments: HADOOP-10571.01.patch
>
>
> When logging an exception, we often convert the exception to string or call 
> {{.getMessage}}. Instead we can use the log method overloads which take 
> {{Throwable}} as a parameter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to