OSDN Git Service

Opz log print (#343)
authoryahtoo <yahtoo.ma@gmail.com>
Tue, 23 Jul 2019 02:29:34 +0000 (10:29 +0800)
committerPaladz <yzhu101@uottawa.ca>
Tue, 23 Jul 2019 02:29:34 +0000 (10:29 +0800)
netsync/consensusmgr/handle.go
p2p/peer.go
protocol/block.go

index ffb5871..65fb9f2 100644 (file)
@@ -67,7 +67,7 @@ func (m *Manager) processMsg(peerID string, msgType byte, msg ConsensusMessage)
                return
        }
 
                return
        }
 
-       logrus.WithFields(logrus.Fields{"module": logModule, "peer": peer.Addr(), "type": reflect.TypeOf(msg), "message": msg.String()}).Info("receive message from peer")
+       logrus.WithFields(logrus.Fields{"module": logModule, "peer": peer.Addr(), "type": reflect.TypeOf(msg), "message": msg.String()}).Debug("receive message from peer")
 
        switch msg := msg.(type) {
        case *BlockProposeMsg:
 
        switch msg := msg.(type) {
        case *BlockProposeMsg:
index d464b67..856d1e9 100644 (file)
@@ -239,7 +239,7 @@ func (p *Peer) TrySend(chID byte, msg interface{}) bool {
                "peer":   p.Addr(),
                "msg":    msg,
                "type":   reflect.TypeOf(msg),
                "peer":   p.Addr(),
                "msg":    msg,
                "type":   reflect.TypeOf(msg),
-       }).Info("send message to peer")
+       }).Debug("send message to peer")
        return p.mconn.TrySend(chID, msg)
 }
 
        return p.mconn.TrySend(chID, msg)
 }
 
index 6799969..86c9650 100644 (file)
@@ -349,7 +349,7 @@ func (c *Chain) blockProcesser() {
 func (c *Chain) processBlock(block *types.Block) (bool, error) {
        blockHash := block.Hash()
        if c.BlockExist(&blockHash) {
 func (c *Chain) processBlock(block *types.Block) (bool, error) {
        blockHash := block.Hash()
        if c.BlockExist(&blockHash) {
-               log.WithFields(log.Fields{"module": logModule, "hash": blockHash.String(), "height": block.Height}).Info("block has been processed")
+               log.WithFields(log.Fields{"module": logModule, "hash": blockHash.String(), "height": block.Height}).Debug("block has been processed")
                return c.orphanManage.BlockExist(&blockHash), nil
        }
 
                return c.orphanManage.BlockExist(&blockHash), nil
        }