aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/main.go
diff options
context:
space:
mode:
authorFrancis Lavoie <[email protected]>2021-03-29 13:03:50 -0400
committerGitHub <[email protected]>2021-03-29 11:03:50 -0600
commit911c8a371aa162d8b82812c3dd0662288fea76e0 (patch)
tree2f3af51cc312f3e1d15d033f2fc0f5771ae6cb99 /cmd/main.go
parent87fbc0783ae45cff885d5118a095ad9ac8c1c08a (diff)
downloadcaddy-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.go2
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
}