From: Yaroslav Kolomiiets Date: Wed, 11 Nov 2020 15:10:05 +0000 (+0000) Subject: Fix excessive logging from mmap-backed storage (anacrolix/torrent#436) X-Git-Tag: v1.19.0~30 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=28b6c93d6e351d4ae21a739837d3f970bec5a10c;p=btrtrc.git Fix excessive logging from mmap-backed storage (anacrolix/torrent#436) --- diff --git a/mmap_span/mmap_span.go b/mmap_span/mmap_span.go index c698a89c..4195a0f0 100644 --- a/mmap_span/mmap_span.go +++ b/mmap_span/mmap_span.go @@ -3,7 +3,6 @@ package mmap_span import ( "fmt" "io" - "log" "sync" "github.com/anacrolix/torrent/segments" @@ -79,7 +78,7 @@ func (ms *MMapSpan) locateCopy(copyArgs func(remainingArgument, mmapped []byte) } func (ms *MMapSpan) WriteAt(p []byte, off int64) (n int, err error) { - log.Printf("writing %v bytes at %v", len(p), off) + // log.Printf("writing %v bytes at %v", len(p), off) ms.mu.RLock() defer ms.mu.RUnlock() n = ms.locateCopy(func(a, b []byte) (_, _ []byte) { return b, a }, p, off)