From 3b1f8991a17cb614717f189f1150709382b30a53 Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Mon, 13 May 2019 15:42:55 -0700 Subject: [PATCH] client: log when server list changes Stop logging in the happy path when nothing has changed. --- client/servers/manager.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/servers/manager.go b/client/servers/manager.go index 1cc61e8f4..fbec774b2 100644 --- a/client/servers/manager.go +++ b/client/servers/manager.go @@ -208,10 +208,11 @@ func (m *Manager) SetServers(servers Servers) bool { // This prevents unnecessary shuffling of a failed server that was moved to the // bottom of the list if equal { - m.logger.Debug("Not replacing server list, current server list is identical to servers discovered in Consul") return !equal } + m.logger.Debug("new server list", "new_servers", servers, "old_servers", m.servers) + // Randomize the incoming servers servers.shuffle() m.servers = servers