format参数的具体格式
#coding :utf-8 import logging logging.basicConfig( level=logging.INFO, format='%(asctime)s %(filename)s %(lineno)d %(levelname)s %(message)s', filename='back.log', filemode='w' ) logging.info('这是第一个日志信息')