Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new log level, TRACE, which is a level below DEBUG.
Here's why I like this...
INFO Output for stuff such as Process startup, Database connected, Access logs.
Typically suitable for production.
DEBUG Output for stuff such as SQL on database accesses, Outgoing HTTP requests, Cache lookups, SMTP requests, Background tasks.
Really useful during development, without presenting too much info. Everything you'd want to see to get a good idea of what I/O the system is performing on each request.
TRACE ASGI messages & other low level stuff
For when you really need to dig into something obscure, or understand exactly whats happening under the hood.
I can see this fitting in really well as a rule of thumb for other components, too. Eg. I'd like to see
httpx
issuing one-line-per-request at DEBUG level, or comprehensive logging of state changes at TRACE level. Looking at a web stack as a whole it feels like a natural split to me.