瀏覽代碼

ZOOKEEPER-3001: Incorrect log message when try to delete container node

Missing `String.format`.

Author: sel-fish <fqlgy@hotmail.com>

Reviewers: Edward Ribeiro <edward.ribeiro@gmail.com>, Andor Molnár <andor@cloudera.com>, Michael Han <hanm@apache.org>, maoling <maoling199210191@sina.com>

Closes #492 from sel-fish/ZOOKEEPER-3001
sel-fish 7 年之前
父節點
當前提交
8cfca3add9
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/java/main/org/apache/zookeeper/server/ContainerManager.java

+ 3 - 3
src/java/main/org/apache/zookeeper/server/ContainerManager.java

@@ -116,12 +116,12 @@ public class ContainerManager {
             Request request = new Request(null, 0, 0,
                     ZooDefs.OpCode.deleteContainer, path, null);
             try {
-                LOG.info("Attempting to delete candidate container: %s",
+                LOG.info("Attempting to delete candidate container: {}",
                         containerPath);
                 requestProcessor.processRequest(request);
             } catch (Exception e) {
-                LOG.error(String.format("Could not delete container: %s" ,
-                        containerPath), e);
+                LOG.error("Could not delete container: {}",
+                        containerPath, e);
             }
 
             long elapsedMs = Time.currentElapsedTime() - startMs;