We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac26e62 commit 1a347b2Copy full SHA for 1a347b2
client/client.go
@@ -61,6 +61,18 @@ var (
61
defaultClient Client
62
)
63
64
+// SetLogger sets the global logger for the Dapr client.
65
+// The default logger has a destination of os.Stdout, SetLogger allows you to
66
+// optionally specify a custom logger (with a custom destination).
67
+// To disable client logging entirely, use a nil argument e.g.: client.SetLogger(nil)
68
+func SetLogger(l *log.Logger) {
69
+ if l == nil {
70
+ l = log.New(io.Discard, "", 0)
71
+ }
72
+
73
+ logger = l
74
+}
75
76
// Client is the interface for Dapr client implementation.
77
//
78
//nolint:interfacebloat
0 commit comments