Skip to content

Commit 4a26a49

Browse files
authored
balancer/leastrequest: Add verbosity check around build log (#7467)
1 parent 887d908 commit 4a26a49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

balancer/leastrequest/leastrequest.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ type scWithRPCCount struct {
112112
}
113113

114114
func (lrb *leastRequestBalancer) Build(info base.PickerBuildInfo) balancer.Picker {
115-
logger.Infof("least-request: Build called with info: %v", info)
115+
if logger.V(2) {
116+
logger.Infof("least-request: Build called with info: %v", info)
117+
}
116118
if len(info.ReadySCs) == 0 {
117119
return base.NewErrPicker(balancer.ErrNoSubConnAvailable)
118120
}

0 commit comments

Comments
 (0)