]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Set debug log level for outgoing connection error
authorMatt Joiner <anacrolix@gmail.com>
Thu, 12 May 2022 03:33:57 +0000 (13:33 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 12 May 2022 03:33:57 +0000 (13:33 +1000)
Contributed by @tsynik in https://github.com/anacrolix/torrent/issues/702#issuecomment-1010523079.

client.go

index 97b67d7c5faf104078f8104915d10d521d42fbea..d8b1706478db3e8f7b165008e5af16adb188cc5f 100644 (file)
--- a/client.go
+++ b/client.go
@@ -772,7 +772,7 @@ func (cl *Client) outgoingConnection(t *Torrent, addr PeerRemoteAddr, ps PeerSou
        cl.noLongerHalfOpen(t, addr.String())
        if err != nil {
                if cl.config.Debug {
-                       cl.logger.Printf("error establishing outgoing connection to %v: %v", addr, err)
+                       cl.logger.Levelf(log.Debug, "error establishing outgoing connection to %v: %v", addr, err)
                }
                return
        }