Skip to content

Conversation

@ftnext
Copy link
Contributor

@ftnext ftnext commented Jun 24, 2025

Summary

While working through the logging documentation, I noticed that DEBUG logs for load_ssl_context and load_verify_locations are not output in HTTPX 0.28.0 and later.
I suggest removing these DEBUG logs (like fixing typos).

Full log
DEBUG [2025-06-24 23:37:20] httpcore.connection - connect_tcp.started host='www.example.com' port=443 local_address=None timeout=5.0 socket_options=None
DEBUG [2025-06-24 23:37:20] httpcore.connection - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x1020fdc10>
DEBUG [2025-06-24 23:37:20] httpcore.connection - start_tls.started ssl_context=<ssl.SSLContext object at 0x102241050> server_hostname='www.example.com' timeout=5.0
DEBUG [2025-06-24 23:37:20] httpcore.connection - start_tls.complete return_value=<httpcore._backends.sync.SyncStream object at 0x1022264b0>
DEBUG [2025-06-24 23:37:20] httpcore.http11 - send_request_headers.started request=<Request [b'GET']>
DEBUG [2025-06-24 23:37:20] httpcore.http11 - send_request_headers.complete
DEBUG [2025-06-24 23:37:20] httpcore.http11 - send_request_body.started request=<Request [b'GET']>
DEBUG [2025-06-24 23:37:20] httpcore.http11 - send_request_body.complete
DEBUG [2025-06-24 23:37:20] httpcore.http11 - receive_response_headers.started request=<Request [b'GET']>
DEBUG [2025-06-24 23:37:20] httpcore.http11 - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Accept-Ranges', b'bytes'), (b'Content-Type', b'text/html'), (b'ETag', b'"84238dfc8092e5d9c0dac8ef93371a07:1736799080.121134"'), (b'Last-Modified', b'Mon, 13 Jan 2025 20:11:20 GMT'), (b'Vary', b'Accept-Encoding'), (b'Content-Encoding', b'gzip'), (b'Cache-Control', b'max-age=2380'), (b'Date', b'Tue, 24 Jun 2025 14:37:20 GMT'), (b'Alt-Svc', b'h3=":443"; ma=93600,h3-29=":443"; ma=93600'), (b'Content-Length', b'648'), (b'Connection', b'keep-alive')])
INFO [2025-06-24 23:37:20] httpx - HTTP Request: GET https://www.example.com "HTTP/1.1 200 OK"
DEBUG [2025-06-24 23:37:20] httpcore.http11 - receive_response_body.started request=<Request [b'GET']>
DEBUG [2025-06-24 23:37:20] httpcore.http11 - receive_response_body.complete
DEBUG [2025-06-24 23:37:20] httpcore.http11 - response_closed.started
DEBUG [2025-06-24 23:37:20] httpcore.http11 - response_closed.complete
DEBUG [2025-06-24 23:37:20] httpcore.connection - close.started
DEBUG [2025-06-24 23:37:20] httpcore.connection - close.complete

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

@lovelydinosaur
Copy link
Contributor

Thanks. ☺️

@lovelydinosaur lovelydinosaur merged commit 3fee278 into encode:master Sep 5, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants