anmolnar commented on a change in pull request #878: ZOOKEEPER-3339: Improve
Debug and Trace Log Statements
URL: https://github.com/apache/zookeeper/pull/878#discussion_r278964357
##########
File path:
zookeeper-server/src/main/java/org/apache/zookeeper/server/NIOServerCnxn.java
##########
@@ -610,11 +604,14 @@ private void closeSock() {
return;
}
- LOG.debug("Closed socket connection for client "
- + sock.socket().getRemoteSocketAddress()
- + (sessionId != 0 ?
- " which had sessionid 0x" +
Long.toHexString(sessionId) :
- " (no session established for client)"));
+ if (LOG.isDebugEnabled()) {
Review comment:
Why haven't you refactored this?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services