busbey commented on a change in pull request #913: HBASE-23381: Improve Logging 
in HBase Commons Package
URL: https://github.com/apache/hbase/pull/913#discussion_r355210283
 
 

 ##########
 File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java
 ##########
 @@ -191,29 +191,22 @@ public static String getPassword(Configuration conf, 
String alias,
       Method m = Configuration.class.getMethod("getPassword", String.class);
       char[] p = (char[]) m.invoke(conf, alias);
       if (p != null) {
-        LOG.debug(String.format("Config option \"%s\" was found through" +
-            " the Configuration getPassword method.", alias));
+        LOG.debug(
+          "Config option \"{}\" was found through the Configuration 
getPassword method",
+          alias);
         passwd = new String(p);
       } else {
-        LOG.debug(String.format(
-            "Config option \"%s\" was not found. Using provided default value",
-            alias));
+        LOG.debug("Config option \"{}\" was not found. Using provided default 
value", alias);
         passwd = defPass;
       }
     } catch (NoSuchMethodException e) {
       // this is a version of Hadoop where the credential
       //provider API doesn't exist yet
-      LOG.debug(String.format(
-          "Credential.getPassword method is not available." +
-              " Falling back to configuration."));
+      LOG.debug("Credential.getPassword method is not available. Falling back 
to configuration",
+        e);
 
 Review comment:
   Why add in the exception?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to