[loggers]

keys=root

 

[handlers]

keys=consoleHandler

 

[formatters]

keys=simpleFormatter

 

[logger_root]

level=DEBUG

handlers=consoleHandler

 

[handler_consoleHandler]

class=StreamHandler

level=DEBUG

formatter=simpleFormatter

args=(sys.stdout,)

 

[formatter_simpleFormatter]

format=%(asctime)s - %(name)s - %(levelname)s - %(message)s

datefmt=

 

importlogging.config

 

logging.config.fileConfig(".\logger.conf")

 

logging.debug("test")

 

posted on 2016-11-29 10:36  ppqchina  阅读(164)  评论(0编辑  收藏  举报