aboutsummaryrefslogtreecommitdiffhomepage
path: root/logging.go
diff options
context:
space:
mode:
Diffstat (limited to 'logging.go')
-rw-r--r--logging.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/logging.go b/logging.go
index 129aec430..5f8ea06a9 100644
--- a/logging.go
+++ b/logging.go
@@ -661,9 +661,15 @@ func newDefaultProductionLog() (*defaultCustomLog, error) {
cl.buildCore()
+ logger := zap.New(cl.core)
+
+ // capture logs from other libraries which
+ // may not be using zap logging directly
+ _ = zap.RedirectStdLog(logger)
+
return &defaultCustomLog{
CustomLog: cl,
- logger: zap.New(cl.core),
+ logger: logger,
}, nil
}