Fixes https://github.com/anacrolix/torrent/issues/837.
"github.com/anacrolix/missinggo/v2"
"github.com/anacrolix/missinggo/v2/filecache"
"github.com/frankban/quicktest"
+ qt "github.com/frankban/quicktest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
})
}
}
+
+// https://github.com/anacrolix/torrent/issues/837
+func TestClientConfigSetHandlerNotIgnored(t *testing.T) {
+ cfg := NewDefaultClientConfig()
+ cfg.Logger.SetHandlers(log.DiscardHandler)
+ c := qt.New(t)
+ cl, err := NewClient(cfg)
+ c.Assert(err, qt.IsNil)
+ defer cl.Close()
+ c.Assert(cl.logger.Handlers, qt.HasLen, 1)
+ h := cl.logger.Handlers[0].(log.StreamHandler)
+ c.Check(h.W, qt.Equals, io.Discard)
+}
github.com/anacrolix/fuse v0.2.0
github.com/anacrolix/generics v0.0.0-20230428105757-683593396d68
github.com/anacrolix/go-libutp v1.2.0
- github.com/anacrolix/log v0.13.2-0.20230518105052-6aef2c4c91f1
+ github.com/anacrolix/log v0.14.0
github.com/anacrolix/missinggo v1.3.0
github.com/anacrolix/missinggo/perf v1.0.0
github.com/anacrolix/missinggo/v2 v2.7.0
github.com/anacrolix/log v0.6.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU=
github.com/anacrolix/log v0.10.0/go.mod h1:s5yBP/j046fm9odtUTbHOfDUq/zh1W8OkPpJtnX0oQI=
github.com/anacrolix/log v0.10.1-0.20220123034749-3920702c17f8/go.mod h1:GmnE2c0nvz8pOIPUSC9Rawgefy1sDXqposC2wgtBZE4=
-github.com/anacrolix/log v0.13.2-0.20230518105052-6aef2c4c91f1 h1:Yo4XQhmdmrkB4RGP7RWvl8U+og2rCBsNqoJFTew0plk=
-github.com/anacrolix/log v0.13.2-0.20230518105052-6aef2c4c91f1/go.mod h1:1OmJESOtxQGNMlUO5rcv96Vpp9mfMqXXbe2RdinFLdY=
+github.com/anacrolix/log v0.14.0 h1:mYhTSemILe/Z8tIxbGdTIWWpPspI8W/fhZHpoFbDaL0=
+github.com/anacrolix/log v0.14.0/go.mod h1:1OmJESOtxQGNMlUO5rcv96Vpp9mfMqXXbe2RdinFLdY=
github.com/anacrolix/lsan v0.0.0-20211126052245-807000409a62 h1:P04VG6Td13FHMgS5ZBcJX23NPC/fiC4cp9bXwYujdYM=
github.com/anacrolix/lsan v0.0.0-20211126052245-807000409a62/go.mod h1:66cFKPCO7Sl4vbFnAaSq7e4OXtdMhRSBagJGWgmpJbM=
github.com/anacrolix/missinggo v0.0.0-20180725070939-60ef2fbf63df/go.mod h1:kwGiTUTZ0+p4vAz3VbAI5a30t2YbvemcmspjKwrAz5s=