Replies: 1 comment
|
You're right. The loggers moved with the rename and that page got missed, so people register a logger nothing writes to. The real names are "loggers": {
"httpx2": {"handlers": ["default"], "level": "DEBUG"},
"httpcore2": {"handlers": ["default"], "level": "DEBUG"},
}To see what your install actually ships, no guessing: import logging, httpx2
httpx2.get("https://www.example.com")
print(sorted(logging.root.manager.loggerDict))The |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
docs/logging.mdstill tells users to configure thehttpcorelogger, but since thepackage rename (#138) the transport loggers shipped in
httpcore2are all under thehttpcore2hierarchy:httpx2/src/httpcore2/httpcore2/_sync/connection.py
Line 22 in c4e73cf
httpx2/src/httpcore2/httpcore2/_sync/http2.py
Line 24 in c4e73cf
httpx2/src/httpcore2/httpcore2/_sync/http11.py
Line 27 in c4e73cf
(same for the
_asyncvariants)It looks like the docs rename sweep (#973) updated
httpxtohttpx2on that page but left thehttpcorereferences untouched.Impact
The
LOGGING_CONFIGdictionary example on the logging page registers a logger named'httpcore'. Anyone copying it gets thehttpx2INFO lines but silently no transport-leveldebug output at all.
Reproduction
emits records from
httpx2,httpcore2.connectionandhttpcore2.http11, nothing fromhttpcore:Affected spots
docs/logging.mddocs/advanced/extensions.md? Still mentioninghttpcoreand mentioning representations of it.Assisted by Claude on this one.
Cheers
All reactions