[ https://issues.apache.org/jira/browse/HADOOP-18206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17678877#comment-17678877 ]
ASF GitHub Bot commented on HADOOP-18206: ----------------------------------------- virajjasani commented on code in PR #5315: URL: https://github.com/apache/hadoop/pull/5315#discussion_r1081715049 ########## hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/LogLevel.java: ########## @@ -340,22 +337,14 @@ public void doGet(HttpServletRequest request, HttpServletResponse response out.println(MARKER + "Submitted Class Name: <b>" + logName + "</b><br />"); - Log log = LogFactory.getLog(logName); + Logger log = Logger.getLogger(logName); out.println(MARKER + "Log Class: <b>" + log.getClass().getName() +"</b><br />"); if (level != null) { out.println(MARKER + "Submitted Level: <b>" + level + "</b><br />"); } - if (log instanceof Log4JLogger) { - process(((Log4JLogger)log).getLogger(), level, out); - } - else if (log instanceof Jdk14Logger) { - process(((Jdk14Logger)log).getLogger(), level, out); - } - else { - out.println("Sorry, " + log.getClass() + " not supported.<br />"); - } + process(log, level, out); Review Comment: Since we are directly instantiating `org.apache.log4j Logger` instance, we don't need to check for unknown logger I believe. If we can't set appropriate log type to logger, we would anyways print this in the `process()` as part of servlet output: ``` out.println(MARKER + "Bad Level : <b>" + level + "</b><br />") ``` Hence, i think we should be good here. > 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