From 8b8abe2268ac10a2f3e2bbb2d0108881027b23b6 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Tue, 5 May 2015 13:00:47 -0700 Subject: [PATCH] consul: fixing overly redundant logging --- consul/leader.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/consul/leader.go b/consul/leader.go index a9802d8b2556..f8083fe046d7 100644 --- a/consul/leader.go +++ b/consul/leader.go @@ -479,7 +479,6 @@ func (s *Server) handleDeregisterMember(reason string, member serf.Member) error // Remove from Raft peers if this was a server if valid, parts := isConsulServer(member); valid { - s.logger.Printf("[INFO] consul: server '%s' %s, removing as peer", member.Name, reason) if err := s.removeConsulServer(member, parts.Port); err != nil { return err } @@ -539,6 +538,8 @@ func (s *Server) removeConsulServer(m serf.Member, port int) error { s.logger.Printf("[ERR] consul: failed to remove raft peer '%v': %v", peer, err) return err + } else if err == nil { + s.logger.Printf("[INFO] consul: removed server '%s' as peer", m.Name) } return nil }