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

Todd Lipcon commented on HDFS-1977:
-----------------------------------

In the places where the log message ends in ": ", I think we should remove the 
": " part, since log4j will already separate the trace from the message. Same 
goes for places where we have a {{"\n"}} or {{+ " got "}}

For lines like the following, can you make the message a little more 
informative?
+                DFSClient.LOG.info("Exception: ", e);
+          LOG.warn("IOException: ", e);

While we're changing the following line, may as well fix the typo also:
+          LOG.info("Could not reade next line in LogHandler : ", e);

> Stop using StringUtils.stringifyException()
> -------------------------------------------
>
>                 Key: HDFS-1977
>                 URL: https://issues.apache.org/jira/browse/HDFS-1977
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Joey Echeverria
>            Assignee: Bharath Mundlapudi
>            Priority: Minor
>         Attachments: HDFS-1977-1.patch, HDFS-1977-2.patch
>
>
> The old version of the logging APIs didn't support logging stack traces by 
> passing exceptions to the logging methods (e.g. Log.error()). A number of log 
> statements make use of StringUtils.stringifyException() to get around the old 
> behavior. It would be nice if this could get cleaned up to make use of the 
> the logger's stack trace printing. This also gives users more control since 
> you can configure how the stack traces are written to the logs.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to