https://mp.weixin.qq.com/s/hy68s610B9GbL_wgwTn7nA
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()
.
原文:https://www.cnblogs.com/yuanjiangw/p/12514692.html