[
https://issues.apache.org/jira/browse/HDFS-6226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13965598#comment-13965598
]
Chris Nauroth commented on HDFS-6226:
-------------------------------------
bq. ...loses data which different appenders ...
Yes, agreed. Just to expand on this a bit, I was prompted to file this jira by
a use case for a custom appender that wants to forward the stack trace, but not
the log message, to an external system for tracking. Right now, this ends up
missing out on the exceptions that were packed into the message field.
bq. This could also be a time to move to SLF4J for a logging api?
This seems reasonable as long as there is no risk of impacting library
dependencies for downstream projects. I see we already have slf4j as a
dependency in hadoop-common, so I expect this is not a problem.
> Replace logging calls that use StringUtils.stringifyException to pass the
> exception instance to the log call.
> -------------------------------------------------------------------------------------------------------------
>
> Key: HDFS-6226
> URL: https://issues.apache.org/jira/browse/HDFS-6226
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 3.0.0, 2.4.0
> Reporter: Chris Nauroth
>
> There are multiple places in the code that call
> {{StringUtils#stringifyException}} to capture the stack trace in a string and
> pass the result to a logging call. The resulting information is identical to
> passing the exception instance directly to the logger, i.e.
> {{LOG.error("fail", e)}}, so we can simplify the code.
--
This message was sent by Atlassian JIRA
(v6.2#6252)