from logging.config import fileConfig import logging #读取日志文件 fileConfig('config/log.ini') db_logger=logging.getLogger('print')fileConfig读取配置文件是报错,如下:
raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.file: 'config/log.ini', line: 1
'锘縖loggers]\n'
解决方案:
将文件用记事本打开,另存为asicii格式
#logging :http://www.cnblogs.com/yyds/p/6885182.html,
http://python.jobbole.com/85279/