Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
cmd: Use formatted logger for config adapter warnings (#4080)
Francis Lavoie committed
Mar 29, 2021 at 13:03 UTC
911c8a371aa162d8b82812c3dd0662288fea76e0
1 file changed
+1
-1
cmd/main.go
+1
-1
@@ -185,7 +185,7 @@ func loadConfig(configFile, adapterName string) ([]byte, string, error) {
185
if warn.Directive != "" {
186
msg = fmt.Sprintf("%s: %s", warn.Directive, warn.Message)
187
}
188
- fmt.Printf("[WARNING][%s] %s:%d: %s\n", adapterName, warn.File, warn.Line, msg)
188
+ caddy.Log().Warn(msg, zap.String("adapter", adapterName), zap.String("file", warn.File), zap.Int("line", warn.Line))
189
}
190
config = adaptedConfig
191
}