slash-init commented on code in PR #3379:
URL: https://github.com/apache/iggy/pull/3379#discussion_r3346279550


##########
foreign/go/client/iggy_client.go:
##########
@@ -72,15 +82,24 @@ func NewIggyClient(options ...Option) (iggcon.Client, 
error) {
                opt(&opts)
        }
 
+       logger := opts.logger
+       if logger == nil {
+               logger = iggcon.NopLogger()
+       }
+
+       // Prepend the logger option so transport inherits it.
+       tcpOpts := append([]tcp.Option{tcp.WithLogger(logger)}, 
opts.tcpOptions...)

Review Comment:
   Makes sense. If `logger.go` and `logger_test.go` are removed, where would 
you like the replacement tests to live? My first thought was to test 
`WithLogger(...)` closer to where it's used, but I'm not sure if that's what 
you were suggesting.
   
   



-- 
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]

Reply via email to