diff options
author | Francis Lavoie <lavofr@gmail.com> | 2021-03-29 13:03:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 11:03:50 -0600 |
commit | 911c8a371aa162d8b82812c3dd0662288fea76e0 (patch) | |
tree | 2f3af51cc312f3e1d15d033f2fc0f5771ae6cb99 | |
parent | 87fbc0783ae45cff885d5118a095ad9ac8c1c08a (diff) |
cmd: Use formatted logger for config adapter warnings (#4080)
-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 886391b..14408fa 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 } |