在logging.basicConfig()函数中可通过具体参数来更改logging模块默认行为,可用参数有: filename,filemode,datefmt,format,level,stream(未介绍) import logging logging.basicConfig(filename='日志.log', filemode='w',datefmt='%m/%d/%Y %I:%M:%S %p', format='%(levelname)s:%(message)s--%(asctime…