From 14fbacd024e38784468cd0a6911c43ba24fe65c4 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 21 Aug 2019 21:00:47 +1000 Subject: [PATCH] Include the piece number when logging piece hash errors --- torrent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torrent.go b/torrent.go index 70c8d420..5fd2bbff 100644 --- a/torrent.go +++ b/torrent.go @@ -745,7 +745,7 @@ func (t *Torrent) hashPiece(piece pieceIndex) (ret metainfo.Hash) { return } if err != io.ErrUnexpectedEOF && !os.IsNotExist(err) { - t.logger.Printf("unexpected error hashing piece with %T: %s", t.storage.TorrentImpl, err) + t.logger.Printf("unexpected error hashing piece %d through %T: %s", piece, t.storage.TorrentImpl, err) } return }