joao-r-reis commented on code in PR #1920:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1920#discussion_r2631557816


##########
logger.go:
##########
@@ -162,7 +162,8 @@ func (l *defaultLogger) Debug(msg string, fields 
...LogField) {
 func (l *defaultLogger) write(prefix string, msg string, fields []LogField) {
        buf := bytes.Buffer{}
        writeLogMsg(&buf, prefix, msg, fields)
-       log.Println(buf.String())
+       // During testing it allows seeing where exactly logging methods are 
called instead of this method
+       log.Output(3, buf.String())

Review Comment:
   This is used in production code as well, I'd prefer to keep this behavior 
unchanged for users



##########
conn.go:
##########
@@ -659,6 +700,8 @@ func (c *Conn) processFrame(ctx context.Context, r 
io.Reader) error {
                return err
        }
 
+       c.logger.Debug("Received frame header", NewLogFieldString("header", 
head.String()))

Review Comment:
   Is this `processFrame` function called on every frame or just handshake 
frames? Running this log call on every frame post handshake seems a bit 
unnecessary no?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to