]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Demote some recent logs to debug
authorMatt Joiner <anacrolix@gmail.com>
Wed, 20 Oct 2021 00:22:35 +0000 (11:22 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 20 Oct 2021 00:22:35 +0000 (11:22 +1100)
peerconn.go

index a5d1581f436ed11062e89f11f4b759be842a8cd3..a9384d7904779006b0b97c8038b65a3f679b62e0 100644 (file)
@@ -1079,7 +1079,7 @@ func (c *PeerConn) mainReadLoop() (err error) {
                        if !c.peerChoking {
                                // Some clients do this for some reason. Transmission doesn't error on this, so we
                                // won't for consistency.
-                               c.logProtocolBehaviour(log.Info, "received unchoke when already unchoked")
+                               c.logProtocolBehaviour(log.Debug, "received unchoke when already unchoked")
                                break
                        }
                        c.peerChoking = false
@@ -1094,7 +1094,7 @@ func (c *PeerConn) mainReadLoop() (err error) {
                        if preservedCount != 0 {
                                // TODO: Yes this is a debug log but I'm not happy with the state of the logging lib
                                // right now.
-                               log.Printf(
+                               c.logger.WithLevel(log.Debug).Printf(
                                        "%v requests were preserved while being choked (fast=%v)",
                                        preservedCount,
                                        c.fastEnabled())