The asyncio package uses the logging module. We should remind users that they should always configure their logs to go to a file on the local filesystem -- using any kind of network logging will block the event loop.
Can we instead re-engineer asyncio logging to have logger calls in a separate thread? I.e. `logger` is a proxy object, that puts logging calls in a queue, and there would be another thread to block on the queue and do the actual logging. This way it won't really matter how logging is configured.
If you really need network logging you should be able to configure a handler that puts things in a queue whose other end is serviced by an asyncio task. There should be no need to mess with the type of the logger object. Anyway, in 3.4 it is what it is. :-)
> If you really need network logging you should be able to configure a handler that puts things in a queue whose other end is serviced by an asyncio task. There should be no need to mess with the type of the logger object. It's something that is easy to misconfigure. Having [logger+queue+logging thread] combination mitigates the risk a bit, but yeah, at the cost of increased complexity... > Anyway, in 3.4 it is what it is. :-) Right.
+Logs for :mod:`asyncio` module should always point to a file on the local +filesystem. Using any kind of network logging will block the event loop. Well... even writing to a local file can block :-/ By "network", what about the local UNIX socket used by syslog? I guess that the safest option would be a new asyncio library running all logs functions to a thread, or maybe using loop.run_in_executor().