指定utf-8编码防止中文乱码logging.basicConfig( handlers=[logging.FileHandler('log.log', 'a', 'utf-8')], ...