anacrolix / torrent

Full-featured BitTorrent client package and utilities
Mozilla Public License 2.0
5.51k stars 622 forks source link

Seeing logs despite setting handler to `DiscardHandler` #837

Closed Elara6331 closed 1 year ago

Elara6331 commented 1 year ago

This library is creating logs despite using cfg.Logger.SetHandlers(log.DiscardHandler). I occasionally see the following log in the output:

2023-05-23 17:25:42 -0700  WRN] *torrent.PeerConn 0xc000875500: received invalid reject [request={199 {278528 16384}}, peer=*torrent.PeerConn 0xc000875500 [id="-FX0200-\xf6\\\xa4\xd4f\xfa\xdb\xdc\x04(\x85\xbd", exts=0000000000100005 (ltep, fast, dht), v="Freebox BitTorrent 2.0"]] [github.com/anacrolix/torrent peerconn.go:830]

I'd like to completely disable all logs from the library. Is there any way to do that?

anacrolix commented 1 year ago

Thanks for the report! This should be fixed in v1.51.3.

Elara6331 commented 1 year ago

Thanks for the report! This should be fixed in v1.51.3.

Thanks :)