joao-r-reis commented on code in PR #1755: URL: https://github.com/apache/cassandra-gocql-driver/pull/1755#discussion_r2143523399
########## 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: Done ########## conn_test.go: ########## @@ -349,15 +350,21 @@ func TestCancel(t *testing.T) { type testQueryObserver struct { metrics map[string]*hostMetrics verbose bool - logger StdLogger + logger StructuredLogger } func (o *testQueryObserver) ObserveQuery(ctx context.Context, q ObservedQuery) { host := q.Host.ConnectAddress().String() o.metrics[host] = q.Metrics if o.verbose { Review Comment: Done -- 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