diff --git a/client.go b/client.go index 9bd16610..98563227 100644 --- a/client.go +++ b/client.go @@ -1037,7 +1037,7 @@ func (cl *Client) gotMetadataExtensionMsg(payload []byte, t *Torrent, c *PeerCon return nil } start := (1 << 14) * piece - c.logger.Printf("sending metadata piece %d", piece) + c.logger.WithDefaultLevel(log.Debug).Printf("sending metadata piece %d", piece) c.post(t.newMetadataExtensionMessage(c, pp.DataMetadataExtensionMsgType, piece, t.metadataBytes[start:start+t.metadataPieceSize(piece)])) return nil case pp.RejectMetadataExtensionMsgType: diff --git a/peerconn.go b/peerconn.go index 585cd886..cc8bdeb8 100644 --- a/peerconn.go +++ b/peerconn.go @@ -392,7 +392,7 @@ func (cn *PeerConn) requestMetadataPiece(index int) { if index < len(cn.metadataRequests) && cn.metadataRequests[index] { return } - cn.logger.Printf("requesting metadata piece %d", index) + cn.logger.WithDefaultLevel(log.Debug).Printf("requesting metadata piece %d", index) cn.post(pp.Message{ Type: pp.Extended, ExtendedID: eID, @@ -670,7 +670,7 @@ func (cn *PeerConn) writer(keepAliveTimeout time.Duration) { keepAliveTimer.Reset(keepAliveTimeout) } if err != nil { - cn.logger.Printf("error writing: %v", err) + cn.logger.WithDefaultLevel(log.Debug).Printf("error writing: %v", err) return } if n != frontBuf.Len() {