Difficult-Rocket/try/logging_conf_check.py
2022-01-19 20:21:57 +08:00

22 lines
499 B
Python

"""
writen by shenjackyuanjie
mail: 3695888@qq.com
github: @shenjackyuanjie
"""
import configparser
import logging.config
configs = configparser.ConfigParser()
configs.read('logging.config')
# configs['version'] = 1
# logging.config.dictConfig(configs)
logging.config.fileConfig('logging.config')
logger = logging.getLogger('simpleExample')
logger.debug('debug message')
logger.info('info message')
logger.warning('warn message')
logger.error('error message')
logger.critical('critical message')