mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-22 16:08:58 +08:00
cmd: Use formatted logger for config adapter warnings (#4080)
This commit is contained in:
parent
87fbc0783a
commit
911c8a371a
|
@ -185,7 +185,7 @@ func loadConfig(configFile, adapterName string) ([]byte, string, error) {
|
|||
if warn.Directive != "" {
|
||||
msg = fmt.Sprintf("%s: %s", warn.Directive, warn.Message)
|
||||
}
|
||||
fmt.Printf("[WARNING][%s] %s:%d: %s\n", adapterName, warn.File, warn.Line, msg)
|
||||
caddy.Log().Warn(msg, zap.String("adapter", adapterName), zap.String("file", warn.File), zap.Int("line", warn.Line))
|
||||
}
|
||||
config = adaptedConfig
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user