[improve][broker] log sessionId with zk-session-watcher for debugging
@@ -149,8 +149,8 @@ public class ZKSessionWatcher implements AutoCloseable, Watcher {
currentStatus = SessionEvent.SessionLost;
sessionListener.accept(currentStatus);
} else if (currentStatus != SessionEvent.SessionLost) {
- log.warn("ZooKeeper client is disconnected. Waiting to reconnect, time remaining = {} seconds",
- timeRemainingMillis / 1000.0);
+ log.warn("[{}] ZooKeeper client is disconnected. Waiting to reconnect, time remaining = {} seconds",
+ zk.getSessionId(), timeRemainingMillis / 1000.0);
if (currentStatus == SessionEvent.SessionReestablished) {
currentStatus = SessionEvent.ConnectionLost;
sessionListener.accept(currentStatus);
