Skip to content

Commit

Permalink
[FAB-5850] Tune leader election log severity
Browse files Browse the repository at this point in the history
The quality team would like to be able to easily
determine whether a peer became a leader or not
when the gossip module isn't in DEBUG log severity.

Change-Id: I8359d3a2a9deec87b7b1f230096ddfa813539dc4
Signed-off-by: yacovm <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Aug 28, 2017
1 parent 20cfd31 commit b5d07d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gossip/election/election.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func (le *leaderElectionSvcImpl) leaderElection() {
// If someone declared itself as a leader, give up
// on trying to become a leader too
if le.isLeaderExists() {
le.logger.Debug(le.id, ": Some peer is already a leader")
le.logger.Info(le.id, ": Some peer is already a leader")
return
}

Expand Down Expand Up @@ -372,13 +372,13 @@ func (le *leaderElectionSvcImpl) IsLeader() bool {
}

func (le *leaderElectionSvcImpl) beLeader() {
le.logger.Debug(le.id, ": Becoming a leader")
le.logger.Info(le.id, ": Becoming a leader")
atomic.StoreInt32(&le.isLeader, int32(1))
le.callback(true)
}

func (le *leaderElectionSvcImpl) stopBeingLeader() {
le.logger.Debug(le.id, "Stopped being a leader")
le.logger.Info(le.id, "Stopped being a leader")
atomic.StoreInt32(&le.isLeader, int32(0))
le.callback(false)
}
Expand Down

0 comments on commit b5d07d1

Please sign in to comment.