diff --git a/consensus/reactor.go b/consensus/reactor.go index ee87b7ba63..4152f3bc43 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -246,7 +246,7 @@ func (conR *Reactor) Receive(e p2p.Envelope) { return } - conR.Logger.Debug("Receive", "src", e.Src, "chId", e.ChannelID, "msg", msg) + conR.Logger.Debug("Receive", "src", e.Src, "chId", e.ChannelID, "msg", "msg") // Get peer states ps, ok := e.Src.Get(types.PeerStateKey).(*PeerState) @@ -1146,7 +1146,7 @@ func (ps *PeerState) SetHasProposalBlockPart(height int64, round int32, index in // Returns true if vote was sent. func (ps *PeerState) PickSendVote(votes types.VoteSetReader) bool { if vote, ok := ps.PickVoteToSend(votes); ok { - ps.logger.Debug("Sending vote message", "ps", ps, "vote", vote) + ps.logger.Debug("Sending vote message", "ps", "ps", "vote", vote) if ps.peer.Send(p2p.Envelope{ ChannelID: VoteChannel, Message: &cmtcons.Vote{ diff --git a/consensus/state.go b/consensus/state.go index d2ae99aef8..44a2aaae1b 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -1719,7 +1719,7 @@ func (cs *State) finalizeCommit(height int64) { "root", block.AppHash, "num_txs", len(block.Txs), ) - logger.Debug("committed block", "block", log.NewLazySprintf("%v", block)) + logger.Debug("committed block", "block", log.NewLazyBlockHash(block), "log.NewLazySprintf(v, block)") fail.Fail() // XXX diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index 266ca32028..1eaa791d16 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -638,7 +638,7 @@ func (mem *CListMempool) Update( // https://github.com/tendermint/tendermint/issues/3322. if err := mem.RemoveTxByKey(tx.Key()); err != nil { mem.logger.Debug("Committed transaction not in local mempool (not an error)", - "key", tx.Key(), + "key", "tx.Key()", "error", err.Error()) } } diff --git a/mempool/reactor.go b/mempool/reactor.go index 6382b0a412..452dc429a1 100644 --- a/mempool/reactor.go +++ b/mempool/reactor.go @@ -137,7 +137,7 @@ func (memR *Reactor) RemovePeer(peer p2p.Peer, _ interface{}) { // Receive implements Reactor. // It adds any received transactions to the mempool. func (memR *Reactor) Receive(e p2p.Envelope) { - memR.Logger.Debug("Receive", "src", e.Src, "chId", e.ChannelID, "msg", e.Message) + memR.Logger.Debug("Receive", "src", "e.Src", "chId", e.ChannelID, "msg", "e.Message") switch msg := e.Message.(type) { case *protomem.Txs: protoTxs := msg.GetTxs() @@ -155,9 +155,9 @@ func (memR *Reactor) Receive(e p2p.Envelope) { ntx := types.Tx(tx) err = memR.mempool.CheckTx(ntx, nil, txInfo) if errors.Is(err, ErrTxInCache) { - memR.Logger.Debug("Tx already exists in cache", "tx", ntx.String()) + memR.Logger.Debug("Tx already exists in cache", "tx", "ntx.String()") } else if err != nil { - memR.Logger.Info("Could not check tx", "tx", ntx.String(), "err", err) + memR.Logger.Info("Could not check tx", "tx", "ntx.String()", "err", err) } } default: