diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | logging.go | 8 |
2 files changed, 8 insertions, 1 deletions
@@ -1,6 +1,7 @@ _gitignore/ *.log Caddyfile +Caddyfile.* !caddyfile/ # artifacts from pprof tooling @@ -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 } |