NihalJain commented on code in PR #5588:
URL: https://github.com/apache/hbase/pull/5588#discussion_r1434132321


##########
hbase-logging/src/main/java/org/apache/hadoop/hbase/logging/InternalLog4jUtils.java:
##########
@@ -36,13 +36,28 @@ final class InternalLog4jUtils {
   private InternalLog4jUtils() {
   }
 
-  static void setLogLevel(String loggerName, String levelName) {
+  private static org.apache.logging.log4j.Level getLevel(String levelName)
+    throws IllegalArgumentException {
     org.apache.logging.log4j.Level level =
       org.apache.logging.log4j.Level.toLevel(levelName.toUpperCase());
     if (!level.toString().equalsIgnoreCase(levelName)) {
       throw new IllegalArgumentException("Unsupported log level " + levelName);
     }
-    org.apache.logging.log4j.core.config.Configurator.setLevel(loggerName, 
level);
+    return level;
+  }
+
+  static void setAllLevels(String loggerName, String levelName) {
+    org.apache.logging.log4j.Level level = getLevel(levelName);

Review Comment:
   this is redundant, remove. reported in findbugs



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to