bt: filter anacrolix logs to errors so warnings don't corrupt the readout

webseed/peer/tracker warnings (the 403/429 chatter) go through slog, the
rest through the legacy analog logger; both default to Warning, which
interleaves with and corrupts the live progress block. Filter both to
Error and above so only genuine errors reach stderr. quietSlogger is a
small testable helper; anacrolix/log becomes a direct dependency.
This commit is contained in:
2026-06-20 21:11:57 +09:00
parent 3fc29e3a86
commit bb49578892
3 changed files with 46 additions and 1 deletions

2
go.mod
View File

@@ -3,6 +3,7 @@ module github.com/hanbok/got
go 1.25
require (
github.com/anacrolix/log v0.17.1-0.20251118025802-918f1157b7bb
github.com/anacrolix/missinggo/v2 v2.10.0
github.com/anacrolix/torrent v1.61.0
golang.org/x/sys v0.38.0
@@ -19,7 +20,6 @@ require (
github.com/anacrolix/envpprof v1.4.0 // indirect
github.com/anacrolix/generics v0.1.1-0.20251125230353-15d98d46693b // indirect
github.com/anacrolix/go-libutp v1.3.2 // indirect
github.com/anacrolix/log v0.17.1-0.20251118025802-918f1157b7bb // indirect
github.com/anacrolix/missinggo v1.3.0 // indirect
github.com/anacrolix/missinggo/perf v1.0.0 // indirect
github.com/anacrolix/mmsg v1.0.1 // indirect