From 54823f52bc9aed66a1a37f820daf6e494181211a Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Tue, 23 Jan 2024 20:52:02 +0300 Subject: [PATCH] cmd: reverseproxy: log: use caddy logger (#6042) --- modules/caddyhttp/reverseproxy/command.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/caddyhttp/reverseproxy/command.go b/modules/caddyhttp/reverseproxy/command.go index 11f935cf..59fa67df 100644 --- a/modules/caddyhttp/reverseproxy/command.go +++ b/modules/caddyhttp/reverseproxy/command.go @@ -308,11 +308,9 @@ func cmdReverseProxy(fs caddycmd.Flags) (int, error) { return caddy.ExitCodeFailedStartup, err } - for _, to := range toAddresses { - fmt.Printf("Caddy proxying %s -> %s\n", fromAddr.String(), to) - } + caddy.Log().Info("caddy proxying", zap.String("from", fromAddr.String()), zap.Strings("to", toAddresses)) if len(toAddresses) > 1 { - fmt.Println("Load balancing policy: random") + caddy.Log().Info("using default load balancing policy", zap.String("policy", "random")) } select {}