zookeeper-dev mailing list archives

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

    https://github.com/apache/zookeeper/pull/430#discussion_r157201054
  
    --- 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 --
    
    [non-blocking]
    
    Although this isn't a regression, you probably want a ": " here (and a space); e.g.,
    
        "Session 0x{} for server {}, unexpected error: {}"


---

Mime
View raw message