From 3a1e0dbf47429f3ae7ddcbbd9acc3707b0ad0083 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Mon, 25 Apr 2022 12:12:10 -0400 Subject: httpcaddyfile: Deprecate paths in site addresses; use zap logs (#4728) --- cmd/commandfuncs.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/commandfuncs.go b/cmd/commandfuncs.go index 79604d9..26b005b 100644 --- a/cmd/commandfuncs.go +++ b/cmd/commandfuncs.go @@ -496,7 +496,9 @@ func cmdAdaptConfig(fl Flags) (int, error) { if warn.Directive != "" { msg = fmt.Sprintf("%s: %s", warn.Directive, warn.Message) } - fmt.Fprintf(os.Stderr, "[WARNING][%s] %s:%d: %s\n", adaptCmdAdapterFlag, warn.File, warn.Line, msg) + caddy.Log().Named(adaptCmdAdapterFlag).Warn(msg, + zap.String("file", warn.File), + zap.Int("line", warn.Line)) } // validate output if requested -- cgit v1.2.3