You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understand correctly, we can use enqueue=True on file sinks so that code does not block on logger.info, there is a background thread collecting log records and sending them to file sinks. However, a background thread (with file IO operations) would still block the execution of the main thread. A better way might be to implement an asynchronous file sink using something like aiofile. Then the IO operations can be asynchronously carried out at the operating system level.
Is there any plan on implementing an asynchronous file sink?
The text was updated successfully, but these errors were encountered:
I would consider improving support for "asynchronous file sink" out-of-the-box if asynchronous file-IO was part of the Python standard library. Right now, I don't want to add a dependency on a third-party library like aiofile. However, creating and sharing such handler in a separate library might prove useful to others.
If I understand correctly, we can use
enqueue=True
on file sinks so that code does not block onlogger.info
, there is a background thread collecting log records and sending them to file sinks. However, a background thread (with file IO operations) would still block the execution of the main thread. A better way might be to implement an asynchronous file sink using something like aiofile. Then the IO operations can be asynchronously carried out at the operating system level.Is there any plan on implementing an asynchronous file sink?
The text was updated successfully, but these errors were encountered: