joao-r-reis commented on code in PR #1755: URL: https://github.com/apache/cassandra-gocql-driver/pull/1755#discussion_r2143320695
########## events.go: ########## @@ -213,9 +217,8 @@ func (s *Session) handleNodeEvent(frames []frame) { } func (s *Session) handleNodeUp(eventIp net.IP, eventPort int) { - if gocqlDebug { - s.logger.Printf("gocql: Session.handleNodeUp: %s:%d\n", eventIp.String(), eventPort) - } + s.logger.Info("Node is UP.", Review Comment: I'd say this is important enough that warrants INFO level ########## session.go: ########## @@ -391,21 +400,20 @@ func (s *Session) reconnectDownedHosts(intv time.Duration) { for { select { case <-reconnectTicker.C: + s.logger.Debug("Connecting to downed hosts if there is any.") hosts := s.ring.allHosts() // Print session.ring for debug. - if gocqlDebug { - buf := bytes.NewBufferString("Session.ring:") - for _, h := range hosts { - buf.WriteString("[" + h.ConnectAddress().String() + ":" + h.State().String() + "]") - } - s.logger.Println(buf.String()) - } + s.logger.Debug("Logging current ring state.", newLogFieldString("ring", ringString(hosts))) for _, h := range hosts { if h.IsUp() { continue } + s.logger.Info("Reconnecting to downed host.", Review Comment: Agree -- 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