goiri commented on a change in pull request #1716: HADOOP-16691: Unify Logging 
in UserGroupInformation
URL: https://github.com/apache/hadoop/pull/1716#discussion_r345940214
 
 

 ##########
 File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
 ##########
 @@ -237,15 +227,13 @@ public boolean commit() throws LoginException {
         } catch (Exception e) {
           throw (LoginException)(new 
LoginException(e.toString()).initCause(e));
         }
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("User entry: \"" + userEntry.toString() + "\"" );
-        }
+        LOG.debug("User entry: \"{}\"", userEntry);
 
         subject.getPrincipals().add(userEntry);
         return true;
       }
-      LOG.error("Can't find user in " + subject);
-      throw new LoginException("Can't find user name");
+      LOG.error("Failed to find user name in " + subject);
 
 Review comment:
   Use {}?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to