You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by sel-fish <gi...@git.apache.org> on 2018/03/18 14:22:37 UTC
[GitHub] zookeeper pull request #492: ZOOKEEPER-3001: Incorrect log message when try ...
GitHub user sel-fish opened a pull request:
https://github.com/apache/zookeeper/pull/492
ZOOKEEPER-3001: Incorrect log message when try to delete container node
Missing `String.format`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sel-fish/zookeeper ZOOKEEPER-3001
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zookeeper/pull/492.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #492
----
commit 814b3b2eed398671b7d124509b4a2b5a87e3680d
Author: sel-fish <fq...@...>
Date: 2018-03-18T14:20:42Z
ZOOKEEPER-3001: Incorrect log message when try to delete container node
----
---
[GitHub] zookeeper issue #492: ZOOKEEPER-3001: Incorrect log message when try to dele...
Posted by eribeiro <gi...@git.apache.org>.
Github user eribeiro commented on the issue:
https://github.com/apache/zookeeper/pull/492
+1 lgtm
---
[GitHub] zookeeper pull request #492: ZOOKEEPER-3001: Incorrect log message when try ...
Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/492#discussion_r175386273
--- Diff: src/java/main/org/apache/zookeeper/server/ContainerManager.java ---
@@ -116,8 +116,8 @@ public void checkContainers()
Request request = new Request(null, 0, 0,
ZooDefs.OpCode.deleteContainer, path, null);
try {
- LOG.info("Attempting to delete candidate container: %s",
- containerPath);
+ LOG.info(String.format("Attempting to delete candidate container: %s",
--- End diff --
+1 for @eribeiro
We already use that form at various places in the codebase, so feel free to use the better one. Existing String.formats should be refactored in the long term, but that probably will happen in small refactorings like this.
---
[GitHub] zookeeper pull request #492: ZOOKEEPER-3001: Incorrect log message when try ...
Posted by eribeiro <gi...@git.apache.org>.
Github user eribeiro commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/492#discussion_r175293565
--- Diff: src/java/main/org/apache/zookeeper/server/ContainerManager.java ---
@@ -116,8 +116,8 @@ public void checkContainers()
Request request = new Request(null, 0, 0,
ZooDefs.OpCode.deleteContainer, path, null);
try {
- LOG.info("Attempting to delete candidate container: %s",
- containerPath);
+ LOG.info(String.format("Attempting to delete candidate container: %s",
--- End diff --
As this a log message you could use
`LOG.info("Attempting to delete candidate container: {}", container Path);`
---
[GitHub] zookeeper pull request #492: ZOOKEEPER-3001: Incorrect log message when try ...
Posted by sel-fish <gi...@git.apache.org>.
Github user sel-fish commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/492#discussion_r175313093
--- Diff: src/java/main/org/apache/zookeeper/server/ContainerManager.java ---
@@ -116,8 +116,8 @@ public void checkContainers()
Request request = new Request(null, 0, 0,
ZooDefs.OpCode.deleteContainer, path, null);
try {
- LOG.info("Attempting to delete candidate container: %s",
- containerPath);
+ LOG.info(String.format("Attempting to delete candidate container: %s",
--- End diff --
to use the same logging style as the other code.
LOG.error(String.format("Could not delete container: %s" ,
containerPath), e);
---
[GitHub] zookeeper pull request #492: ZOOKEEPER-3001: Incorrect log message when try ...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/zookeeper/pull/492
---