connection.go | 5 +++-- diff --git a/connection.go b/connection.go index c3a566500bd4d4be1a6433a2c2d411440a8187b9..da18c5bc4dd4cd347fe5a45ae27da7c5d296e7cb 100644 --- a/connection.go +++ b/connection.go @@ -6,13 +6,14 @@ "bytes" "errors" "fmt" "io" - "log" "math/rand" "net" "strconv" "strings" "sync" "time" + + "github.com/anacrolix/log" "github.com/anacrolix/missinggo" "github.com/anacrolix/missinggo/bitmap" @@ -1203,7 +1204,7 @@ // We had the piece, but not anymore. break another } } - log.Printf("error sending chunk %+v to peer: %s", r, err) + log.Str("error sending chunk to peer").AddValues(c, r, err).Log(c.t.logger) // If we failed to send a chunk, choke the peer to ensure they // flush all their requests. We've probably dropped a piece, // but there's no way to communicate this to the peer. If they