Files
ddns-updater-qdm12-3/cmd/ddns-updater/main.go
fredericrous 80bcec2404 perf: skip HTTP body reading when debug logging is disabled
The loggingRoundTripper was unconditionally reading entire HTTP
request/response bodies via io.ReadAll() on every round trip, even
at the default Info log level. The expensive work (body read, string
conversion, concatenation) happened before Debug() was called, so
the logger's internal level check couldn't prevent it.

Now makeLogClient skips wrapping the transport entirely when debug
logging is not enabled, eliminating all overhead in the common case.

Fixes #1096

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:57:38 +01:00

11 KiB