diff --git a/logging_conf.py b/logging_conf.py new file mode 100644 index 0000000..8d0e2e5 --- /dev/null +++ b/logging_conf.py @@ -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)