diff --git a/EDMCLogging.py b/EDMCLogging.py index 77030bb..6dfd169 100644 --- a/EDMCLogging.py +++ b/EDMCLogging.py @@ -38,6 +38,7 @@ To utilise logging in a 'found' (third-party) plugin, include this: import inspect import logging import logging.handlers +import os from contextlib import suppress from fnmatch import fnmatch # So that any warning about accessing a protected member is only in one place. @@ -439,7 +440,7 @@ def get_main_logger(sublogger_name: str = '') -> 'LoggerMixin': # Singleton -loglevel = logging.DEBUG +loglevel = logging._nameToLevel.get(os.getenv('JUBILANT_LOG_LEVEL').upper(), logging.DEBUG) # noqa: base_logger_name = __name__