From 78c9d526c31d5ae06d5793b865d25a9407b635dc Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 29 Mar 2016 11:37:29 -0700 Subject: [PATCH] change some log.Info to log.Debug --- connection.go | 12 ++++++------ switch.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/connection.go b/connection.go index 5ef77f7d..7c77edf5 100644 --- a/connection.go +++ b/connection.go @@ -196,7 +196,7 @@ func (c *MConnection) Send(chID byte, msg interface{}) bool { return false } - log.Info("Send", "channel", chID, "conn", c, "msg", msg) //, "bytes", wire.BinaryBytes(msg)) + log.Debug("Send", "channel", chID, "conn", c, "msg", msg) //, "bytes", wire.BinaryBytes(msg)) // Send message to channel. channel, ok := c.channelsIdx[chID] @@ -225,7 +225,7 @@ func (c *MConnection) TrySend(chID byte, msg interface{}) bool { return false } - log.Info("TrySend", "channel", chID, "conn", c, "msg", msg) + log.Debug("TrySend", "channel", chID, "conn", c, "msg", msg) // Send message to channel. channel, ok := c.channelsIdx[chID] @@ -277,12 +277,12 @@ FOR_LOOP: channel.updateStats() } case <-c.pingTimer.Ch: - log.Info("Send Ping") + log.Debug("Send Ping") wire.WriteByte(packetTypePing, c.bufWriter, &n, &err) c.sendMonitor.Update(int(n)) c.flush() case <-c.pong: - log.Info("Send Pong") + log.Debug("Send Pong") wire.WriteByte(packetTypePong, c.bufWriter, &n, &err) c.sendMonitor.Update(int(n)) c.flush() @@ -411,11 +411,11 @@ FOR_LOOP: switch pktType { case packetTypePing: // TODO: prevent abuse, as they cause flush()'s. - log.Info("Receive Ping") + log.Debug("Receive Ping") c.pong <- struct{}{} case packetTypePong: // do nothing - log.Info("Receive Pong") + log.Debug("Receive Pong") case packetTypeMsg: pkt, n, err := msgPacket{}, int(0), error(nil) wire.ReadBinaryPtr(&pkt, c.bufReader, maxMsgPacketTotalSize(), &n, &err) diff --git a/switch.go b/switch.go index fddb99e6..b59c6b12 100644 --- a/switch.go +++ b/switch.go @@ -312,7 +312,7 @@ func (sw *Switch) IsDialing(addr *NetAddress) bool { // NOTE: Broadcast uses goroutines, so order of broadcast may not be preserved. func (sw *Switch) Broadcast(chID byte, msg interface{}) chan bool { successChan := make(chan bool, len(sw.peers.List())) - log.Info("Broadcast", "channel", chID, "msg", msg) + log.Debug("Broadcast", "channel", chID, "msg", msg) for _, peer := range sw.peers.List() { go func(peer *Peer) { success := peer.Send(chID, msg)