So the Python stdlib’s logging library isn’t async (coroutines). So if I log out something I am making blocking calls. The first question is “Does this even matter?”. I know the OS manages file buffering itself, so maybe it’s not blocking for that long. Second question is “If this does matter, how can I utilize the standard lib logger and wrap it in a couroutine?”.
I am aware of the https://github.com/b2wdigital/aiologger package. Having a thread pool managing that sounds overkill though. It does appear that stdout/stderr handlers is implemented as coroutines, and if I am running in a docker container then I’m kind of set with the docker logs functionality, but if I am not running in a container then I would be logging out to a app.log file.