joao-r-reis commented on code in PR #1755: URL: https://github.com/apache/cassandra-gocql-driver/pull/1755#discussion_r2143313300
########## control.go: ########## @@ -380,20 +407,25 @@ func (c *controlConn) reconnect() { } defer atomic.StoreInt32(&c.reconnecting, 0) - conn, err := c.attemptReconnect() + _, err := c.attemptReconnect() - if conn == nil { - c.session.logger.Printf("gocql: unable to reconnect control connection: %v\n", err) + if err != nil { + c.session.logger.Error("Unable to reconnect control connection.", + newLogFieldError("err", err)) return } err = c.session.refreshRing() if err != nil { - c.session.logger.Printf("gocql: unable to refresh ring: %v\n", err) + c.session.logger.Warning("Unable to refresh ring.", + newLogFieldError("err", err)) } } func (c *controlConn) attemptReconnect() (*Conn, error) { + + c.session.logger.Info("Reconnecting the control connection.") Review Comment: In my experience having information about the state of the control connection is very very useful because connectivity issues are very often related to issues with the control connection (like a stale view of the ring for example). That's why I tend to log most stuff related to the control connection at INFO level. This one in particular can probably be changed to DEBUG because we already have other INFO level messages to indicate the outcome of the connection/reconnection. -- 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. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org