mirror of
https://github.com/caddyserver/caddy.git
synced 2026-01-17 01:30:34 +00:00
logging: Use RedirectStdLog to capture more stdlib logs (#4732)
* logging: Use `RedirectStdLog` * .gitignore a file pattern that I'm constantly using for testing
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user