cli: reduce logging for httpx / httpcore#11
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reduces noisy HTTP client logging in the CLI by overriding the log levels for httpx and httpcore after the CLI logging is configured.
Changes:
- Set
httpxlogger level toWARNINGin CLI logging configuration. - Set
httpcorelogger level toWARNINGin CLI logging configuration.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| logging.getLogger("httpcore").setLevel(logging.WARNING) | ||
|
|
||
|
|
There was a problem hiding this comment.
Setting the httpx/httpcore logger levels to WARNING unconditionally can increase verbosity when the requested CLI log level is higher (e.g. ERROR/CRITICAL). In Python logging, parent/root logger levels do not filter propagated records—so a child logger at WARNING will still emit warnings via the root handler even if the root logger is set to ERROR. Consider setting these libraries to max(requested_level, WARNING) (i.e., keep them at least WARNING, but never below the user-requested threshold).
No description provided.