From a28d9249660348c11635844e7c7a4f07ac162009 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Sun, 19 Jul 2015 22:02:06 +0000 Subject: [PATCH] move some logs to debug --- consensus/reactor.go | 6 +++--- p2p/connection.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/consensus/reactor.go b/consensus/reactor.go index c9ba33725..a5f21aeb4 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -133,8 +133,8 @@ func (conR *ConsensusReactor) RemovePeer(peer *p2p.Peer, reason interface{}) { // Implements Reactor // NOTE: We process these messages even when we're fast_syncing. func (conR *ConsensusReactor) Receive(chId byte, peer *p2p.Peer, msgBytes []byte) { - log.Info("Receive", "channel", chId, "peer", peer, "bytes", msgBytes) if !conR.IsRunning() { + log.Debug("Receive", "channel", chId, "peer", peer, "bytes", msgBytes) return } @@ -146,7 +146,7 @@ func (conR *ConsensusReactor) Receive(chId byte, peer *p2p.Peer, msgBytes []byte log.Warn("Error decoding message", "channel", chId, "peer", peer, "msg", msg, "error", err, "bytes", msgBytes) return } - log.Info("Receive", "channel", chId, "peer", peer, "msg", msg, "rsHeight", rs.Height) //, "bytes", msgBytes) + log.Debug("Receive", "channel", chId, "peer", peer, "msg", msg, "rsHeight", rs.Height) switch chId { case StateChannel: @@ -471,7 +471,7 @@ OUTER_LOOP: sleeping = 0 } - log.Info("gossipVotesRoutine", "rsHeight", rs.Height, "rsRound", rs.Round, + log.Debug("gossipVotesRoutine", "rsHeight", rs.Height, "rsRound", rs.Round, "prsHeight", prs.Height, "prsRound", prs.Round, "prsStep", prs.Step) // If height matches, then send LastCommit, Prevotes, Precommits. diff --git a/p2p/connection.go b/p2p/connection.go index c3219795b..c095c1662 100644 --- a/p2p/connection.go +++ b/p2p/connection.go @@ -151,7 +151,7 @@ func (c *MConnection) String() string { } func (c *MConnection) flush() { - log.Info("Flush", "conn", c) + log.Debug("Flush", "conn", c) err := c.bufWriter.Flush() if err != nil { log.Warn("MConnection flush failed", "error", err) @@ -426,7 +426,7 @@ FOR_LOOP: break FOR_LOOP } if msgBytes != nil { - log.Info("Received bytes", "chId", pkt.ChannelId, "msgBytes", msgBytes) + log.Debug("Received bytes", "chId", pkt.ChannelId, "msgBytes", msgBytes) c.onReceive(pkt.ChannelId, msgBytes) } default: @@ -565,7 +565,7 @@ func (ch *Channel) nextMsgPacket() msgPacket { // Not goroutine-safe func (ch *Channel) writeMsgPacketTo(w io.Writer) (n int64, err error) { packet := ch.nextMsgPacket() - log.Info("Write Msg Packet", "conn", ch.conn, "packet", packet) + log.Debug("Write Msg Packet", "conn", ch.conn, "packet", packet) binary.WriteByte(packetTypeMsg, w, &n, &err) binary.WriteBinary(packet, w, &n, &err) if err != nil { @@ -577,7 +577,7 @@ func (ch *Channel) writeMsgPacketTo(w io.Writer) (n int64, err error) { // Handles incoming msgPackets. Returns a msg bytes if msg is complete. // Not goroutine-safe func (ch *Channel) recvMsgPacket(packet msgPacket) ([]byte, error) { - log.Info("Read Msg Packet", "conn", ch.conn, "packet", packet) + log.Debug("Read Msg Packet", "conn", ch.conn, "packet", packet) if binary.MaxBinaryReadSize < len(ch.recving)+len(packet.Bytes) { return nil, binary.ErrBinaryReadSizeOverflow }