cmd: reverseproxy: log: use caddy logger (#6042)

This commit is contained in:
Mohammed Al Sahaf 2024-01-23 20:52:02 +03:00 committed by GitHub
parent ed7e3c906a
commit 54823f52bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 4 deletions

View File

@ -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 {}