From: Matt Joiner Date: Mon, 14 Jul 2025 12:15:55 +0000 (+1000) Subject: Set webseed.PrintDebug from environment X-Git-Tag: v1.59.0~16 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ab6e107a5564cbeefe6b49e8644eb662cd4aa183;p=btrtrc.git Set webseed.PrintDebug from environment --- 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 {