Browse Source

cmd: Use formatted logger for config adapter warnings (#4080)

master
Francis Lavoie 4 years ago
committed by GitHub
parent
commit
911c8a371a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/main.go

2
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
}

Loading…
Cancel
Save