]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Remove debug logging from storage file implementation
authorMatt Joiner <anacrolix@gmail.com>
Mon, 1 Jun 2020 01:12:51 +0000 (11:12 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 1 Jun 2020 01:12:51 +0000 (11:12 +1000)
storage/file.go

index 0a4143a4510d0016d068e48ddabfa4e3ac183c33..6dc3aeebb781be357d50ab80c99ecbba8173a970 100644 (file)
@@ -2,7 +2,6 @@ package storage
 
 import (
        "io"
-       "log"
        "os"
        "path/filepath"
 
@@ -176,7 +175,7 @@ func (fst fileTorrentImplIO) ReadAt(b []byte, off int64) (n int, err error) {
 }
 
 func (fst fileTorrentImplIO) WriteAt(p []byte, off int64) (n int, err error) {
-       log.Printf("write at %v: %v bytes", off, len(p))
+       //log.Printf("write at %v: %v bytes", off, len(p))
        fst.fts.segmentLocater.Locate(segments.Extent{off, int64(len(p))}, func(i int, e segments.Extent) bool {
                name := fst.fts.fileInfoName(fst.fts.upvertedFiles[i])
                os.MkdirAll(filepath.Dir(name), 0777)
@@ -187,7 +186,7 @@ func (fst fileTorrentImplIO) WriteAt(p []byte, off int64) (n int, err error) {
                }
                var n1 int
                n1, err = f.WriteAt(p[:e.Length], e.Start)
-               log.Printf("%v %v wrote %v: %v", i, e, n1, err)
+               //log.Printf("%v %v wrote %v: %v", i, e, n1, err)
                closeErr := f.Close()
                n += n1
                p = p[n1:]