Skip to content

Commit

Permalink
cmd: reverseproxy: log: use caddy logger (#6042)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammed90 committed Jan 23, 2024
1 parent ed7e3c9 commit 54823f5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/caddyhttp/reverseproxy/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down

0 comments on commit 54823f5

Please sign in to comment.