You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/09/10 06:11:37 UTC

[GitHub] [zookeeper] TisonKun commented on a change in pull request #1084: ZOOKEEPER-3541: Wrong placeholder '{}' in logs.

TisonKun commented on a change in pull request #1084: ZOOKEEPER-3541: Wrong placeholder '{}' in logs.
URL: https://github.com/apache/zookeeper/pull/1084#discussion_r322566400
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/client/ZooKeeperSaslClient.java
 ##########
 @@ -274,7 +274,7 @@ public void respondToServer(byte[] serverToken, ClientCnxn cnxn) {
             } catch (SaslException e) {
                 LOG.error("SASL authentication failed using login context '"
                           + this.getLoginContext()
-                          + "' with exception: {}", e);
 
 Review comment:
   @eolivelli there are several overload methods, what are relevant is as below
   
   ```java
   public void error(String format, Object... arguments);
   public void error(String msg, Throwable t);
   ```
   
   I think
   
   ```java
   LOG.error(String.format("... %s", e.getMessage()), e);
   ```
   
   is also a valid fix.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services