From 4a26a494081a67f29e8acf158913609c686e701d Mon Sep 17 00:00:00 2001 From: Zach Reyes <39203661+zasweq@users.noreply.github.com> Date: Thu, 1 Aug 2024 19:02:14 -0400 Subject: [PATCH] balancer/leastrequest: Add verbosity check around build log (#7467) --- balancer/leastrequest/leastrequest.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/balancer/leastrequest/leastrequest.go b/balancer/leastrequest/leastrequest.go index c248a3a83c32..ddd9bd269bf4 100644 --- a/balancer/leastrequest/leastrequest.go +++ b/balancer/leastrequest/leastrequest.go @@ -112,7 +112,9 @@ type scWithRPCCount struct { } func (lrb *leastRequestBalancer) Build(info base.PickerBuildInfo) balancer.Picker { - logger.Infof("least-request: Build called with info: %v", info) + if logger.V(2) { + logger.Infof("least-request: Build called with info: %v", info) + } if len(info.ReadySCs) == 0 { return base.NewErrPicker(balancer.ErrNoSubConnAvailable) }