We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93591e7 commit 65e7361Copy full SHA for 65e7361
grpclog/logger.go
@@ -42,6 +42,8 @@ import (
42
)
43
44
// Use golang's standard logger by default.
45
+// Access is not mutex-protected: do not modify except in init()
46
+// functions.
47
var logger Logger = log.New(os.Stderr, "", log.LstdFlags)
48
49
// Logger mimics golang's standard Logger as an interface.
@@ -54,7 +56,8 @@ type Logger interface {
54
56
Println(args ...interface{})
55
57
}
58
-// SetLogger sets the logger that is used in grpc.
59
+// SetLogger sets the logger that is used in grpc. Call only from
60
+// init() functions.
61
func SetLogger(l Logger) {
62
logger = l
63
0 commit comments