enixon commented on a change in pull request #1100: ZOOKEEPER-3509: Revisit log 
format
URL: https://github.com/apache/zookeeper/pull/1100#discussion_r329701560
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java
 ##########
 @@ -441,11 +450,11 @@ protected void syncWithLeader(long newLeaderZxid) throws 
Exception {
             } else if (qp.getType() == Leader.TRUNC) {
                 //we need to truncate the log to the lastzxid of the leader
                 self.setSyncMode(QuorumPeer.SyncMode.TRUNC);
-                LOG.warn("Truncating log to get in sync with the leader 0x" + 
Long.toHexString(qp.getZxid()));
+                LOG.warn("Truncating log to get in sync with the leader 0x{}", 
Long.toHexString(qp.getZxid()));
                 boolean truncated = 
zk.getZKDatabase().truncateLog(qp.getZxid());
                 if (!truncated) {
                     // not able to truncate the log
-                    LOG.error("Not able to truncate the log " + 
Long.toHexString(qp.getZxid()));
+                    LOG.error("Not able to truncate the log {}", 
Long.toHexString(qp.getZxid()));
 
 Review comment:
   Add "0x"?

----------------------------------------------------------------
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