python自动化测试脚本运行后,想要将日志保存到某个特定文件,使用python的logging模块实现 参考代码: import logging def initLogging(logFilename,e): logging.basicConfig( level = logging.INFO, format ='%(asctime)s-%(levelname)s-%(message)s', datefmt = '%y-%m-%d %H:%M', filename = logFilename,…