From d91af318759e1ddf58bbc8b7ec14b2273fa6e3f2 Mon Sep 17 00:00:00 2001 From: Arjan Bal Date: Wed, 11 Dec 2024 10:59:48 +0530 Subject: [PATCH] Less logging --- balancer/weightedroundrobin/balancer.go | 4 +++- xds/internal/balancer/outlierdetection/subconn_wrapper.go | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/balancer/weightedroundrobin/balancer.go b/balancer/weightedroundrobin/balancer.go index fb1393688863..ad3ec98b7806 100644 --- a/balancer/weightedroundrobin/balancer.go +++ b/balancer/weightedroundrobin/balancer.go @@ -219,7 +219,9 @@ type wrrBalancer struct { } func (b *wrrBalancer) UpdateClientConnState(ccs balancer.ClientConnState) error { - b.logger.Infof("UpdateCCS: %v", ccs) + if b.logger.V(2) { + b.logger.Infof("UpdateCCS: %v", ccs) + } cfg, ok := ccs.BalancerConfig.(*lbConfig) if !ok { return fmt.Errorf("wrr: received nil or illegal BalancerConfig (type %T): %v", ccs.BalancerConfig, ccs.BalancerConfig) diff --git a/xds/internal/balancer/outlierdetection/subconn_wrapper.go b/xds/internal/balancer/outlierdetection/subconn_wrapper.go index dfa404483a7e..058bd182dbac 100644 --- a/xds/internal/balancer/outlierdetection/subconn_wrapper.go +++ b/xds/internal/balancer/outlierdetection/subconn_wrapper.go @@ -96,7 +96,6 @@ func (scw *subConnWrapper) String() string { } func (scw *subConnWrapper) RegisterHealthListener(listener func(balancer.SubConnState)) { - fmt.Println("Health listener registered") scw.mu.Lock() defer scw.mu.Unlock()