[log] use info level for viewchange log

Signed-off-by: Leo Chen <leo@harmony.one>
pull/3379/head
Leo Chen 4 years ago
parent df9d54443d
commit 5ba139fded
  1. 4
      consensus/view_change.go
  2. 2
      consensus/view_change_msg.go

@ -155,7 +155,7 @@ func (consensus *Consensus) startViewChange(viewID uint64) {
// onViewChange is called when the view change message is received.
func (consensus *Consensus) onViewChange(msg *msg_pb.Message) {
consensus.getLogger().Debug().Msg("[onViewChange] Received ViewChange Message")
consensus.getLogger().Info().Msg("[onViewChange] Received ViewChange Message")
recvMsg, err := ParseViewChangeMessage(msg)
if err != nil {
consensus.getLogger().Warn().Err(err).Msg("[onViewChange] Unable To Parse Viewchange Message")
@ -165,7 +165,7 @@ func (consensus *Consensus) onViewChange(msg *msg_pb.Message) {
newLeaderKey := recvMsg.LeaderPubkey
newLeaderPriKey, err := consensus.GetLeaderPrivateKey(newLeaderKey.Object)
if err != nil {
consensus.getLogger().Debug().
consensus.getLogger().Info().
Err(err).
Str("Sender", recvMsg.SenderPubkey.Bytes.Hex()).
Str("NextLeader", recvMsg.LeaderPubkey.Bytes.Hex()).

@ -40,7 +40,7 @@ func (consensus *Consensus) constructViewChangeMessage(priKey *bls.PrivateKeyWra
var encodedBlock []byte
if preparedMsg != nil {
block := consensus.FBFTLog.GetBlockByHash(preparedMsg.BlockHash)
consensus.getLogger().Debug().
consensus.getLogger().Info().
Interface("Block", block).
Interface("preparedMsg", preparedMsg).
Msg("[constructViewChangeMessage] found prepared msg")

Loading…
Cancel
Save