From 10a4999db07e7eb5d08a54f05f166401515becc1 Mon Sep 17 00:00:00 2001 From: apolcyn Date: Mon, 11 Jun 2018 10:38:41 -0700 Subject: [PATCH] Add some debug info (#2136) --- balancer/grpclb/grpclb_remote_balancer.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/balancer/grpclb/grpclb_remote_balancer.go b/balancer/grpclb/grpclb_remote_balancer.go index 1911ffd2..063c087e 100644 --- a/balancer/grpclb/grpclb_remote_balancer.go +++ b/balancer/grpclb/grpclb_remote_balancer.go @@ -56,7 +56,7 @@ func (lb *lbBalancer) processServerList(l *lbpb.ServerList) { lb.fullServerList = l.Servers var backendAddrs []resolver.Address - for _, s := range l.Servers { + for i, s := range l.Servers { if s.Drop { continue } @@ -73,7 +73,8 @@ func (lb *lbBalancer) processServerList(l *lbpb.ServerList) { Addr: fmt.Sprintf("%s:%d", ipStr, s.Port), Metadata: &md, } - + grpclog.Infof("lbBalancer: server list entry[%d]: ipStr:|%s|, port:|%d|, load balancer token:|%v|", + i, ipStr, s.Port, s.LoadBalanceToken) backendAddrs = append(backendAddrs, addr) }