aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMohammed Al Sahaf <[email protected]>2024-01-23 20:52:02 +0300
committerGitHub <[email protected]>2024-01-23 10:52:02 -0700
commit54823f52bc9aed66a1a37f820daf6e494181211a (patch)
treef7ebf49728008416e368817c62f60bba9cf53800
parented7e3c906ab7ab8a91b5ce4d4345c46e4a351d2a (diff)
downloadcaddy-54823f52bc9aed66a1a37f820daf6e494181211a.tar.gz
caddy-54823f52bc9aed66a1a37f820daf6e494181211a.zip
cmd: reverseproxy: log: use caddy logger (#6042)
-rw-r--r--modules/caddyhttp/reverseproxy/command.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/caddyhttp/reverseproxy/command.go b/modules/caddyhttp/reverseproxy/command.go
index 11f935cf9..59fa67df0 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 {}