Skip to content

Commit

Permalink
Adjust gossip logging levels
Browse files Browse the repository at this point in the history
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 <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Mar 14, 2017
1 parent 96b1b90 commit 13194fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gossip/discovery/discovery_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions gossip/gossip/gossip_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 13194fa

Please sign in to comment.