From e8a2e563707c4bff3a391f7b73f5a6fe89a47bc1 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Sun, 27 Mar 2016 01:32:04 -0700 Subject: [PATCH] Move rebalance log statement from INFO to DEBUG --- consul/server_details/server_details.go | 7 ++++--- consul/server_manager/server_manager.go | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/consul/server_details/server_details.go b/consul/server_details/server_details.go index 0040c96402..a6c170d6d0 100644 --- a/consul/server_details/server_details.go +++ b/consul/server_details/server_details.go @@ -48,12 +48,13 @@ func (s *ServerDetails) Key() *Key { // String returns a string representation of ServerDetails func (s *ServerDetails) String() string { - var serverAddr string + var addrStr, networkStr string if s.Addr != nil { - serverAddr = s.Addr.String() + s.Addr.Network() + addrStr = s.Addr.String() + networkStr = s.Addr.Network() } - return fmt.Sprintf("%s (Addr: %s) (DC: %s)", s.Name, serverAddr, s.Datacenter) + return fmt.Sprintf("%s (Addr: %s/%s) (DC: %s)", s.Name, addrStr, networkStr, s.Datacenter) } // IsConsulServer returns true if a serf member is a consul server. Returns a diff --git a/consul/server_manager/server_manager.go b/consul/server_manager/server_manager.go index 193db400d0..92a1583f32 100644 --- a/consul/server_manager/server_manager.go +++ b/consul/server_manager/server_manager.go @@ -384,7 +384,7 @@ FAILED_SERVER_DURING_REBALANCE: goto FAILED_SERVER_DURING_REBALANCE } - sm.logger.Printf("[INFO] server manager: Rebalanced %d servers, next active server is %s", len(serverCfg.servers), serverCfg.servers[0].String()) + sm.logger.Printf("[DEBUG] server manager: Rebalanced %d servers, next active server is %s", len(serverCfg.servers), serverCfg.servers[0].String()) return } @@ -444,7 +444,7 @@ func (sm *ServerManager) Start() { for { select { case <-sm.rebalanceTimer.C: - sm.logger.Printf("[INFO] server manager: Rebalancing server connections") + //sm.logger.Printf("[INFO] server manager: Rebalancing server connections") sm.RebalanceServers() sm.refreshServerRebalanceTimer()