From ab6e107a5564cbeefe6b49e8644eb662cd4aa183 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 14 Jul 2025 22:15:55 +1000 Subject: [PATCH] Set webseed.PrintDebug from environment --- webseed/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webseed/client.go b/webseed/client.go index 9cd59c1f..f6e03da5 100644 --- a/webseed/client.go +++ b/webseed/client.go @@ -8,6 +8,7 @@ import ( "log" "log/slog" "net/http" + "os" "strings" "github.com/RoaringBitmap/roaring" @@ -28,6 +29,10 @@ const MaxDiscardBytes = 48 << 10 // Output debug information to stdout. var PrintDebug = false +func init() { + _, PrintDebug = os.LookupEnv("TORRENT_WEBSEED_DEBUG") +} + type RequestSpec = segments.Extent type requestPart struct { -- 2.51.0