Suppress provider debug logs by default#143
Conversation
|
CI note: the only red check is The same LiveKit target fails on untouched All checks relevant to this provider log hygiene change are green, including Google ADK, unit tests across Python 3.10-3.14, CodeQL, Cursor Security Reviewer, and Mendral. I split the LiveKit compatibility issue into Linear ENG-2508 so this PR can stay focused on ENG-2506. |
ade2eca to
49b95b3
Compare
49b95b3 to
2c2f9e0
Compare
There was a problem hiding this comment.
LGTM
Implementation is correct and secure. The suppression logic properly gates all attached handlers, the double suppress_provider_debug_loggers() call in init_logger correctly handles post-basicConfig state, and httpx retains its CRITICAL level because the guard condition won't downgrade it. No issues.
Tag @mendral-app with feedback or questions. View session
Summary
BL_ALLOW_PROVIDER_DEBUG_LOGS=trueas an explicit opt-in for trusted local debuggingVerification
uv run ruff check .uv run pytest tests/core/test_logger.py -qBL_WORKSPACE=main uv run --locked --python 3.13 --extra googleadk --group test pytest tests/integration/googleadk/test_model.py -qmake test(213 passed)Deployed proof
Fresh temp Google ADK agent deployed with a local SDK wheel and explicit
LOG_LEVEL=DEBUG.13/13succeededLLM Request:0Request options:0RAW RESPONSE:0X-Blaxel-Authorization:0authorization:0bearer:00Temp agent was deleted and verified absent after the scan.
Linear: ENG-2506
Note
Suppresses a fixed list of provider loggers (LiteLLM, google-adk, httpx, openai, httpcore) to WARNING by default during
init_loggerand defensively re-applies suppression around every Google ADK model call. Opt-in viaBL_ALLOW_PROVIDER_DEBUG_LOGS=true. Adds unit and integration test coverage.Written by Mendral for commit 2c2f9e0.