zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #430: ZOOKEEPER-2893. very poor choice of logging if ...
Date Fri, 15 Dec 2017 18:22:00 GMT
Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/430#discussion_r157266599
  
    --- Diff: src/java/main/org/apache/zookeeper/ClientCnxn.java ---
    @@ -1231,14 +1231,14 @@ public void run() {
                                 LOG.info(e.getMessage() + RETRY_CONN_MSG);
                             } else if (e instanceof RWServerFoundException) {
                                 LOG.info(e.getMessage());
    +                        } else if (e instanceof SocketException) {
    +                            LOG.info("Socket error occurred: {}: {}", serverAddress,
e.getMessage());
                             } else {
    -                            LOG.warn(
    -                                    "Session 0x"
    -                                            + Long.toHexString(getSessionId())
    -                                            + " for server "
    -                                            + clientCnxnSocket.getRemoteSocketAddress()
    -                                            + ", unexpected error"
    -                                            + RETRY_CONN_MSG, e);
    +                            LOG.warn("Session 0x{} for server {}, unexpected error{}",
    --- End diff --
    
    No, because the RETRY_CONN_MSG should go right after it. (starts with ", ")


---

Mime
View raw message