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

Kitti Nanasi commented on HDFS-14050:
-------------------------------------

I think slf4j 1.7.x (in trunk it is 1.7.25) handles throwables as the last 
parameter fine, it will recognise that it is a throwable and print it like 
that. So the following two lines of code should print the exact same message.
{code:java}
LOG.error("Fsck: could not copy block {} to {}", lblock.getBlock(), target , e);
LOG.error("Fsck: could not copy block " + lblock.getBlock() + " to " + target, 
e);
{code}

> Use parameterized logging construct in NamenodeFsck class
> ---------------------------------------------------------
>
>                 Key: HDFS-14050
>                 URL: https://issues.apache.org/jira/browse/HDFS-14050
>             Project: Hadoop HDFS
>          Issue Type: Task
>    Affects Versions: 3.0.0
>            Reporter: Hrishikesh Gadre
>            Assignee: Hrishikesh Gadre
>            Priority: Trivial
>         Attachments: HDFS-14050-001.patch, HDFS-14050-002.patch, 
> HDFS-14050-003.patch
>
>
> HDFS-13695 implemented a change to use slf4j logger (instead of commons 
> logging). But the NamenodeFsck class is still not using parameterized logging 
> construct. This came up during the code review for HADOOP-11391. We should 
> change logging statements in NamenodeFsck to use slf4j style parameterized 
> logging apis.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to