From 13194fac40ed1a7de04b19eeedd482e0672c9e1b Mon Sep 17 00:00:00 2001 From: YACOVM Date: Tue, 14 Mar 2017 11:50:09 +0200 Subject: [PATCH] Adjust gossip logging levels This commit: 1) Changes an Entering logging event from Info to Debug 2) Changes a logging event in case of receiving a message (or an API call) regarding a channel that isn't known to the peer from Warn to Debug Change-Id: If10cd1d0ac1153481e905f2c78f9a2f747834ab5 Signed-off-by: Yacov Manevich --- gossip/discovery/discovery_impl.go | 2 +- gossip/gossip/gossip_impl.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gossip/discovery/discovery_impl.go b/gossip/discovery/discovery_impl.go index a346007164e..b6d80441b55 100644 --- a/gossip/discovery/discovery_impl.go +++ b/gossip/discovery/discovery_impl.go @@ -716,7 +716,7 @@ func (d *gossipDiscoveryImpl) createAliveMessage(includeInternalEndpoint bool) * } func (d *gossipDiscoveryImpl) learnExistingMembers(aliveArr []*proto.SignedGossipMessage) { - d.logger.Infof("Entering: learnedMembers={%v}", aliveArr) + d.logger.Debugf("Entering: learnedMembers={%v}", aliveArr) defer d.logger.Debug("Exiting") d.lock.Lock() diff --git a/gossip/gossip/gossip_impl.go b/gossip/gossip/gossip_impl.go index a79070ba1b9..28a068f9114 100644 --- a/gossip/gossip/gossip_impl.go +++ b/gossip/gossip/gossip_impl.go @@ -315,7 +315,7 @@ func (g *gossipServiceImpl) handleMessage(m proto.ReceivedMessage) { } } if !g.toDie() { - g.logger.Warning("No such channel", msg.Channel, "discarding message", msg) + g.logger.Debug("No such channel", msg.Channel, "discarding message", msg) } } else { if m.GetGossipMessage().IsLeadershipMsg() { @@ -600,7 +600,7 @@ func (g *gossipServiceImpl) Peers() []discovery.NetworkMember { func (g *gossipServiceImpl) PeersOfChannel(channel common.ChainID) []discovery.NetworkMember { gc := g.chanState.getGossipChannelByChainID(channel) if gc == nil { - g.logger.Warning("No such channel", channel) + g.logger.Debug("No such channel", channel) return nil } @@ -640,7 +640,7 @@ func (g *gossipServiceImpl) UpdateMetadata(md []byte) { func (g *gossipServiceImpl) UpdateChannelMetadata(md []byte, chainID common.ChainID) { gc := g.chanState.getGossipChannelByChainID(chainID) if gc == nil { - g.logger.Warning("No such channel", chainID) + g.logger.Debug("No such channel", chainID) return } stateInfMsg, err := g.createStateInfoMsg(md, chainID)