New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement async bound loggers for stdlib #245
Conversation
e8f90f2
to
29a043c
Compare
I’m personally not sure how I feel about the thread executor approach. I understand that for such a rich library as Structlog—with various processors, handlers, and loggers—it might be even the only solution, to wrap a blocking logger calls (and everything behind it) and execute them in threads. And yet I wonder if a simplistic log record emitting is worth the cost of thread creation and existence. I mean, the downsides of threads are well known. So it’s a compromise. On the other hand, an Asyncio’s Nonetheless, I’m glad to see it’s a WIP already, good job |
There are two problems here:
|
8c0abe1
to
df1178a
Compare
5469e59
to
36eeb18
Compare
This is so far only an experimental WiP/PoC. But unless I'm missing anything, adding truly async loggers shouldn't be much of a problem.
You can use it like this: