From 78ef411ad25f3c788527cff74184ba69d012cc7d Mon Sep 17 00:00:00 2001 From: Linghong Date: Mon, 20 Jul 2026 02:35:54 +0000 Subject: [PATCH] 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 --- app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app.py b/app.py index 4491690..5bc6056 100644 --- a/app.py +++ b/app.py @@ -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()