Add logging configuration.

This commit is contained in:
Mikaël Ates 2016-03-10 07:02:49 +01:00
parent d7d52026e6
commit ffc5103dac
1 changed files with 27 additions and 0 deletions

27
logging_conf.py Normal file
View File

@ -0,0 +1,27 @@
import logging.config
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'verbose': {
'format': '[%(asctime)s] %(levelname)s %(name)s.%(funcName)s: %(message)s',
'datefmt': '%Y-%m-%d %a %H:%M:%S'
},
},
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'verbose',
},
},
'loggers': {
'': {
'handlers': ['console'],
'level': 'DEBUG',
},
},
}
logging.config.dictConfig(LOGGING)