python不生成logfi

2024-10-02 08:22:11 发布

您现在位置:Python中文网/ 问答频道 /正文

logging.basicConfig(filename='/home/achref/Documents/auto-test/NeoPosTestLog.log',level=logging.INFO, filemode='w', format="[%(asctime)s] %(levelname)s %(message)s")
logging.info("ChromeBrowser Test setup")

当我执行上述脚本时,日志文件不会出现。我已经在Windows上测试过了,效果很好,但在ubuntu18.04上不起作用。我正在使用python 3.6.5


Tags: testinfologformathomeautologgingfilename

热门问题