[
https://issues.apache.org/jira/browse/HADOOP-10571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989110#comment-13989110
]
Steve Loughran commented on HADOOP-10571:
-----------------------------------------
Arpit, we had a discussion on common-dev about actually switching to SLF4J -its
on the classpath. If we are going to rework exceptions it lets us
# varags
# skip the {{is*Enabled}} checks -at least on info err and warn
# rely on dynamic string expansion with handling for nulls and first element of
arrays
# let you include the text of an exception in the short message, as well as its
stack (it looks for a throwable as the last arg and prints the stack trace.
# still compatible at source level with commons-logging
together this would let you do
{code}
log.info("exception connecting to {} with timeout :{},host, time, e").
{code}
> 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
> 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.2#6252)