You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 21, 2021. It is now read-only.
I'd like to use Conn.SetLogger(Logger) to change the behavior of the default logger. go test -race reports a race with the call to this function and calls to c.logger.Printf(...) in conn.go (e.g., in the connect(...) function. I'm using SetLogger(...) as follows:
I think the race is due to the fact that zk.Connect() spawns a goroutine that accesses zkConn.logger and calling zkConn.SetLogger() also touches that property. I don't know if this can really be a problem in practice, but you could solve it by passing an option to zk.Connect(). Namely, defining
I'd like to use
Conn.SetLogger(Logger)
to change the behavior of the default logger.go test -race
reports a race with the call to this function and calls toc.logger.Printf(...)
in conn.go (e.g., in theconnect(...)
function. I'm usingSetLogger(...)
as follows:Am I using this capability incorrectly or is it a bug?
The text was updated successfully, but these errors were encountered: