Merge branch 'master' of git.zavage.net:Zavage/app_skellington

This commit is contained in:
Mathew Guest 2022-03-02 02:23:43 -07:00
commit 6805d18fad
2 changed files with 4 additions and 5 deletions

@ -20,7 +20,7 @@ if not check_env_has_dependencies(libnames):
# Logger for before the application and logging config is loaded # Logger for before the application and logging config is loaded
# - used to log before logging is configured # - used to log before logging is configured
_log_fmt = '%(levelname)-7s:%(message)s' _log_fmt = '%(levelname)-7s:%(message)s'
_logger_name = 'app_skellington' _logger_name = 'skell'
_bootstrap_logger = logging.getLogger(_logger_name) _bootstrap_logger = logging.getLogger(_logger_name)
# NOTE(MG) Logger monkey-patch: # NOTE(MG) Logger monkey-patch:

@ -22,7 +22,6 @@ DEFAULT_LOG_SETTINGS = {
'level': 'debug', 'level': 'debug',
'formatter': 'colored' 'formatter': 'colored'
} }
}, },
'loggers': { 'loggers': {
@ -142,12 +141,12 @@ class LoggingLayer:
# logging configuration is read from config file. # logging configuration is read from config file.
# See _bootstrap.py # See _bootstrap.py
if os.environ.get('APPSKELLINGTON_DEBUG', None): if os.environ.get('APPSKELLINGTON_DEBUG', None):
if 'app_skellington' not in config_dict['loggers']: if _bootstrap_logger not in config_dict['loggers']:
config_dict['loggers']['app_skellington'] = { config_dict['loggers'][_bootstrap_logger] = {
'level': 'debug', 'propagate': 'false' 'level': 'debug', 'propagate': 'false'
} }
else: else:
config_dict['loggers']['app_skellington']['level'] = 'debug' config_dict['loggers'][_bootstrap_logger]['level'] = 'debug'
def _convert_str_to_loglevel(self, dict_, key): def _convert_str_to_loglevel(self, dict_, key):
""" """