tintoy / seqlog

Python logging integration for Seq (https://getseq.net)
https://seqlog.readthedocs.io/
MIT License
17 stars 11 forks source link

Async IO Support? #24

Closed jboarman closed 3 years ago

jboarman commented 4 years ago

Can you confirm that the current version of seqlog posts log events synchronously? If it's currently sequential, can you confirm whether async processing is on the roadmap?

Since HTTP POST events can take some time to respond, logging can have a negative performance impact. So, I was considering setting up a local queue to process logging events (potentially on top of this async http lib: https://github.com/encode/httpx).

But, ideally, the posts to the Seq server would be done asynchronously using Python's built-in async processing so that I didn't have to set that up myself.

tintoy commented 4 years ago

Hi!

Sorry for taking so long to respond, I've been away from things for a while :)

At present, yes, we just use the Requests library to make HTTP requests. But the individual log entries are placed in a queue which is processed asynchronously (so no logger methods should ever be blocking as far as I am aware).

Does that answer your question?

jboarman commented 3 years ago

Yes. Thanks!