File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/main/java/com/github/shyiko/mysql/binlog Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -319,6 +319,7 @@ public void connect() throws IOException {
319319 if (connected ) {
320320 throw new IllegalStateException ("BinaryLogClient is already connected" );
321321 }
322+ Long connectionId ;
322323 try {
323324 try {
324325 Socket socket = socketFactory != null ? socketFactory .createSocket () : new Socket ();
@@ -339,6 +340,7 @@ public void connect() throws IOException {
339340 errorPacket .getSqlState ());
340341 }
341342 GreetingPacket greetingPacket = new GreetingPacket (initialHandshakePacket );
343+ connectionId = greetingPacket .getThreadId ();
342344 authenticate (greetingPacket .getScramble (), greetingPacket .getServerCollation ());
343345 if (binlogFilename == null ) {
344346 fetchBinlogFilenameAndPosition ();
@@ -362,7 +364,8 @@ public void connect() throws IOException {
362364 }
363365 connected = true ;
364366 if (logger .isLoggable (Level .INFO )) {
365- logger .info ("Connected to " + hostname + ":" + port + " at " + binlogFilename + "/" + binlogPosition );
367+ logger .info ("Connected to " + hostname + ":" + port + " at " + binlogFilename + "/" + binlogPosition +
368+ " (sid:" + serverId + ", cid:" + connectionId + ")" );
366369 }
367370 synchronized (lifecycleListeners ) {
368371 for (LifecycleListener lifecycleListener : lifecycleListeners ) {
You can’t perform that action at this time.
0 commit comments