Some more Adaption to new logging (as in pygal)

This commit is contained in:
Dirk Alders 2021-01-21 19:39:20 +01:00
parent 176794a3fc
commit 6397ca4139
2 changed files with 9 additions and 1 deletions

View File

@ -2,6 +2,9 @@
# General settings
#
# APP_NAME is used for logging
APP_NAME = 'patt'
# SECURITY WARNING: don't run with debug turned on in production!
# DEBUG = False

View File

@ -17,6 +17,11 @@ import stat
import sys
import random
try:
from config import APP_NAME as ROOT_LOGGER_NAME
except ImportError:
ROOT_LOGGER_NAME = 'root'
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
#
@ -238,7 +243,7 @@ File "%(pathname)s", line %(lineno)d, in %(funcName)s
'level': 'INFO',
'propagate': False,
},
config.APP_NAME: {
ROOT_LOGGER_NAME: {
'handlers': default_handler,
'level': 'DEBUG' if DEBUG else 'INFO',
'propagate': False,