我已经在使用基本日志记录配置,其中所有模块中的所有消息都存储在一个文件中.但是,我现在需要一个更复杂的解决方案:
我一直在阅读模块的文档,目前它们对我来说非常复杂.记录器,处理程序......
简而言之:
如何在Python 3中记录两个文件,即:
import logging
# ...
logging.file1.info('Write this to file 1')
logging.file2.info('Write this to file 2')
Run Code Online (Sandbox Code Playgroud)