Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 18:15 UTC
cmd: reverseproxy: log: use caddy logger (#6042)
Mohammed Al Sahaf committed
Jan 23, 2024 at 20:52 UTC
54823f52bc9aed66a1a37f820daf6e494181211a
1 file changed
+2
-4
modules/caddyhttp/reverseproxy/command.go
+2
-4
@@ -308,11 +308,9 @@ func cmdReverseProxy(fs caddycmd.Flags) (int, error) {
308
return caddy.ExitCodeFailedStartup, err
309
}
310
311
- for _, to := range toAddresses {
312
- fmt.Printf("Caddy proxying %s -> %s\n", fromAddr.String(), to)
313
- }
311
+ caddy.Log().Info("caddy proxying", zap.String("from", fromAddr.String()), zap.Strings("to", toAddresses))
312
if len(toAddresses) > 1 {
315
- fmt.Println("Load balancing policy: random")
313
+ caddy.Log().Info("using default load balancing policy", zap.String("policy", "random"))
314
}
315
316
select {}