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

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

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


##########
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:
   i'm just worried about any link problems if log4j is off the cp



##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/service/ServiceOperations.java:
##########
@@ -67,26 +66,6 @@ public static Exception stopQuietly(Service service) {
     return stopQuietly(LOG, service);
   }
 
-  /**
-   * Stop a service; if it is null do nothing. Exceptions are caught and
-   * logged at warn level. (but not Throwables). This operation is intended to
-   * be used in cleanup operations
-   *
-   * @param log the log to warn at
-   * @param service a service; may be null
-   * @return any exception that was caught; null if none was.
-   * @see ServiceOperations#stopQuietly(Service)
-   */
-  public static Exception stopQuietly(Log log, Service service) {

Review Comment:
   we should still @deprecate. i don't think it's used outside our own 
codebase, fwiw



##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -8853,16 +8849,12 @@ public void logAuditEvent(boolean succeeded, String 
userName,
     }
 
     public void logAuditMessage(String message) {
-      auditLog.info(message);
+      AUDIT_LOG.info(message);
     }
   }
 
   private static void enableAsyncAuditLog(Configuration conf) {
-    if (!(auditLog instanceof Log4JLogger)) {

Review Comment:
   ok





> 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