异步日志 Loguru
https://mp.weixin.qq.com/s/hy68s610B9GbL_wgwTn7nA
更优美的python日志管理库Loguru
Asynchronous, Thread-safe, Multiprocess-safe
All sinks added to the logger are thread-safe by default. They are not multiprocess-safe, but you can enqueue the messages to ensure logs integrity. This same argument can also be used if you want async logging.
logger.add("somefile.log", enqueue=True)
Coroutine functions used as sinks are also supported and should be awaited with complete().

浙公网安备 33010602011771号