From: ucwong Date: Wed, 6 Jan 2021 09:27:17 +0000 (+0800) Subject: connection drop log debug level X-Git-Tag: v1.21.0~7 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=52bb7f7a39577e431b119ca83b8384849922eeac;p=btrtrc.git connection drop log debug level --- diff --git a/cmd/torrent-metainfo-pprint/main.go b/cmd/torrent-metainfo-pprint/main.go index c6ab27ec..16f2b303 100644 --- a/cmd/torrent-metainfo-pprint/main.go +++ b/cmd/torrent-metainfo-pprint/main.go @@ -47,7 +47,7 @@ func processReader(r io.Reader) error { "AnnounceList": metainfo.AnnounceList, "UrlList": metainfo.UrlList, } - if len(metainfo.Nodes) > 0 { + if len(metainfo.Nodes) > 0 { d["Nodes"] = metainfo.Nodes } if flags.Files { diff --git a/torrent.go b/torrent.go index ffb452d4..462dad1e 100644 --- a/torrent.go +++ b/torrent.go @@ -842,7 +842,7 @@ func (t *Torrent) maybeDropMutuallyCompletePeer( if p.useful() { return } - log.Printf("dropping %v, which is mutually complete", p) + t.logger.WithDefaultLevel(log.Debug).Printf("dropping %v, which is mutually complete", p) p.drop() }