From 5fcb920f969d8ea13e92d4c4b11870afb883653d Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 3 Feb 2018 12:06:52 +1100 Subject: [PATCH] Use new logging in connection.go --- connection.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/connection.go b/connection.go index c3a56650..da18c5bc 100644 --- a/connection.go +++ b/connection.go @@ -6,7 +6,6 @@ import ( "errors" "fmt" "io" - "log" "math/rand" "net" "strconv" @@ -14,6 +13,8 @@ import ( "sync" "time" + "github.com/anacrolix/log" + "github.com/anacrolix/missinggo" "github.com/anacrolix/missinggo/bitmap" "github.com/anacrolix/missinggo/iter" @@ -1203,7 +1204,7 @@ another: 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 -- 2.50.0