From 78695ed62e7b001ab721481c534a402627b0dad8 Mon Sep 17 00:00:00 2001 From: Mathew Guest Date: Wed, 6 Oct 2021 04:30:27 -0600 Subject: [PATCH] renamed default logger and removed static reference to old name --- app_skellington/_bootstrap.py | 2 +- app_skellington/log.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app_skellington/_bootstrap.py b/app_skellington/_bootstrap.py index f53faa0..1be9abb 100644 --- a/app_skellington/_bootstrap.py +++ b/app_skellington/_bootstrap.py @@ -20,7 +20,7 @@ if not check_env_has_dependencies(libnames): # Logger for before the application and logging config is loaded # - used to log before logging is configured _log_fmt = '%(levelname)-7s:%(message)s' -_logger_name = 'app_skellington' +_logger_name = 'skell' _bootstrap_logger = logging.getLogger(_logger_name) # NOTE(MG) Logger monkey-patch: diff --git a/app_skellington/log.py b/app_skellington/log.py index c2ed2ed..eab2423 100644 --- a/app_skellington/log.py +++ b/app_skellington/log.py @@ -22,7 +22,6 @@ DEFAULT_LOG_SETTINGS = { 'level': 'debug', 'formatter': 'colored' } - }, 'loggers': { @@ -140,12 +139,12 @@ class LoggingLayer: # logging configuration is read from config file. # See _bootstrap.py if os.environ.get('APPSKELLINGTON_DEBUG', None): - if 'app_skellington' not in config_dict['loggers']: - config_dict['loggers']['app_skellington'] = { + if _bootstrap_logger not in config_dict['loggers']: + config_dict['loggers'][_bootstrap_logger] = { 'level': 'debug', 'propagate': 'false' } else: - config_dict['loggers']['app_skellington']['level'] = 'debug' + config_dict['loggers'][_bootstrap_logger]['level'] = 'debug' def _convert_str_to_loglevel(self, dict_, key): """