diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index 7cf6a255..0e15eb05 100644 --- a/cmd/torrent/main.go +++ b/cmd/torrent/main.go @@ -225,7 +225,7 @@ func mainErr() error { client.WriteStatus(w) }) if stdoutAndStderrAreSameFile() { - log.Default = log.Logger{log.StreamLogger{W: progress.Bypass(), Fmt: log.LineFormatter}} + log.SetDefault(log.Logger{log.StreamLogger{W: progress.Bypass(), Fmt: log.LineFormatter}}) } if flags.Progress { progress.Start() diff --git a/config.go b/config.go index e328170c..9f6ae1da 100644 --- a/config.go +++ b/config.go @@ -172,7 +172,7 @@ func NewDefaultClientConfig() *ClientConfig { CryptoSelector: mse.DefaultCryptoSelector, CryptoProvides: mse.AllSupportedCrypto, ListenPort: 42069, - Logger: log.Default, + Logger: log.Default(), } //cc.ConnTracker.SetNoMaxEntries() //cc.ConnTracker.Timeout = func(conntrack.Entry) time.Duration { return 0 } diff --git a/go.mod b/go.mod index 6885479d..4f5cad38 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ require ( bazil.org/fuse v0.0.0-20180421153158-65cc252bf669 github.com/RoaringBitmap/roaring v0.4.21 // indirect github.com/alexflint/go-arg v1.2.0 - github.com/anacrolix/dht/v2 v2.3.1 + github.com/anacrolix/dht/v2 v2.3.2-0.20200103043204-8dce00767ebd github.com/anacrolix/envpprof v1.1.0 github.com/anacrolix/go-libutp v1.0.2 - github.com/anacrolix/log v0.4.0 + github.com/anacrolix/log v0.5.0 github.com/anacrolix/missinggo v1.2.1 github.com/anacrolix/missinggo/perf v1.0.0 github.com/anacrolix/missinggo/v2 v2.3.1 diff --git a/go.sum b/go.sum index 02d31eab..e06309ff 100644 --- a/go.sum +++ b/go.sum @@ -26,8 +26,8 @@ github.com/anacrolix/dht/v2 v2.0.1 h1:gOHJ+OKqJ4Eb48OYStZm4AlWr1/nSA2TWlzb/+t36S github.com/anacrolix/dht/v2 v2.0.1/go.mod h1:GbTT8BaEtfqab/LPd5tY41f3GvYeii3mmDUK300Ycyo= github.com/anacrolix/dht/v2 v2.2.1-0.20191103020011-1dba080fb358 h1:Fji8X0K+FTn9UUupodVCCnQG7wNXETUARGT+8P5s+N0= github.com/anacrolix/dht/v2 v2.2.1-0.20191103020011-1dba080fb358/go.mod h1:d7ARx3WpELh9uOEEr0+8wvQeVTOkPse4UU6dKpv4q0E= -github.com/anacrolix/dht/v2 v2.3.1 h1:kEQ6SQrY/p4ageA4KkraA5hCrHiCg79Xb3XrxyZUVtA= -github.com/anacrolix/dht/v2 v2.3.1/go.mod h1:lFjYQPwXAvfkfNh+jmeJqgVLTfdlF/6gIy50byACQa0= +github.com/anacrolix/dht/v2 v2.3.2-0.20200103043204-8dce00767ebd h1:E++LyIPdbudruP7Nbsoy1lCkB0CC9GyUYxXlxq2VDMk= +github.com/anacrolix/dht/v2 v2.3.2-0.20200103043204-8dce00767ebd/go.mod h1:cgjKyErDnKS6Mej5D1fEqBKg3KwFF2kpFZJp3L6/fGI= github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa h1:xCaATLKmn39QqLs3tUZYr6eKvezJV+FYvVOLTklxK6U= github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c= github.com/anacrolix/envpprof v1.0.0 h1:AwZ+mBP4rQ5f7JSsrsN3h7M2xDW/xSE66IPVOqlnuUc= @@ -46,8 +46,8 @@ github.com/anacrolix/log v0.3.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgw github.com/anacrolix/log v0.3.1-0.20190913000754-831e4ffe0174/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= github.com/anacrolix/log v0.3.1-0.20191001111012-13cede988bcd h1:E3J4yy2mfow1JAM2vWMWO4L1EUNuugmxMhk1dhX4bbU= github.com/anacrolix/log v0.3.1-0.20191001111012-13cede988bcd/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= -github.com/anacrolix/log v0.4.0 h1:sOT4yO5Q5+eVONFxKsVCLisyLSOXb+si+tYmFEMCy88= -github.com/anacrolix/log v0.4.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= +github.com/anacrolix/log v0.5.0 h1:SD3p5SJZ77we9rt+YbRsL64SAQTAns+9nSYXxFmVVi8= +github.com/anacrolix/log v0.5.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= github.com/anacrolix/missinggo v0.0.0-20180522035225-b4a5853e62ff/go.mod h1:b0p+7cn+rWMIphK1gDH2hrDuwGOcbB6V4VXeSsEfHVk= github.com/anacrolix/missinggo v0.0.0-20180725070939-60ef2fbf63df/go.mod h1:kwGiTUTZ0+p4vAz3VbAI5a30t2YbvemcmspjKwrAz5s= github.com/anacrolix/missinggo v0.2.1-0.20190310234110-9fbdc9f242a8 h1:E2Xb2SBsVzHJ1tNMW9QcckYEQcyBKz1ee8qVjeVRWys=