diff options
author | Francis Lavoie <[email protected]> | 2021-03-29 13:03:50 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-29 11:03:50 -0600 |
commit | 911c8a371aa162d8b82812c3dd0662288fea76e0 (patch) | |
tree | 2f3af51cc312f3e1d15d033f2fc0f5771ae6cb99 /cmd/main.go | |
parent | 87fbc0783ae45cff885d5118a095ad9ac8c1c08a (diff) | |
download | caddy-911c8a371aa162d8b82812c3dd0662288fea76e0.tar.gz caddy-911c8a371aa162d8b82812c3dd0662288fea76e0.zip |
cmd: Use formatted logger for config adapter warnings (#4080)
Diffstat (limited to 'cmd/main.go')
-rw-r--r-- | cmd/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/main.go b/cmd/main.go index 886391b7e..14408fa6b 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -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 } |