Pytest配置文件pytest.ini如何编写生成日志文件?
1、新建pytest.ini文件
[pytest]
log_cli=true
log_leveL=NOTSET
log_format = %(asctime)s %(levelname)s %(message)s %(filename)s %(funcName)s %(lineno)d
log_date_format = %Y-%m-%d %H:%M:%S
log_file = ./logdata/log.log
log_file_level = info
log_file_format = %(asctime)s %(levelname)s %(message)s %(filename)s %(funcName)s %(lineno)d
log_file _date_format = %Y-%m-%d %H:%M:%S
关闭日志
log_cli=true 改成 log_cli=false