Silence httpx per-request INFO lines on the prose log stream

httpx logs every outbound fetch at INFO with the full presigned image_url,
leaking per-request records (and OSS credential/signature params) into the
event stream that is meant for low-volume prose only. The access JSONL
already records the URL, so cap the httpx logger at WARNING.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 02:35:54 +00:00
parent 43797eedeb
commit 78ef411ad2
+4
View File
@@ -92,6 +92,10 @@ _event_handler.setFormatter(
logging.Formatter("%(asctime)s %(levelname)s %(name)s [%(request_id)s] %(message)s")
)
logging.basicConfig(level=os.environ.get("BGFILTER_LOG_LEVEL", "INFO"), handlers=[_event_handler])
# httpx logs one INFO line per outbound request (full presigned image_url included);
# that is per-request noise on the prose stream -- the access JSONL already records
# the URL. Keep only its warnings/errors.
logging.getLogger("httpx").setLevel(logging.WARNING)
logger = logging.getLogger("bgfilter.app")
ACCESS_LOG_PATH = os.environ.get("BGFILTER_ACCESS_LOG", "").strip()