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

ASF GitHub Bot commented on HADOOP-18206:
-----------------------------------------

virajjasani commented on code in PR #5315:
URL: https://github.com/apache/hadoop/pull/5315#discussion_r1087096464


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java:
##########
@@ -360,7 +358,8 @@ public class DataNode extends ReconfigurableBase
               FS_GETSPACEUSED_JITTER_KEY,
               FS_GETSPACEUSED_CLASSNAME));
 
-  public static final Log METRICS_LOG = 
LogFactory.getLog("DataNodeMetricsLog");
+  public static final org.apache.log4j.Logger METRICS_LOG =
+      org.apache.log4j.Logger.getLogger("DataNodeMetricsLog");

Review Comment:
   I agree for using slf4j directly but the problem here is that 
`makeMetricsLoggerAsync()` is adding async appenders and using few more APIs 
like `setAdditivity()` and `removeAppender()` directly from log4j.
   Hence, for this PR, it would be difficult to switch to using slf4j. But yes 
this work is planned as a sub-task.





> Cleanup the commons-logging references in the code base
> -------------------------------------------------------
>
>                 Key: HADOOP-18206
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18206
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Duo Zhang
>            Assignee: Viraj Jasani
>            Priority: Major
>              Labels: pull-request-available
>
> Should always use slf4j



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to