diff --git a/gusto/core/logging.py b/gusto/core/logging.py index c6df8eab4..552dac2af 100644 --- a/gusto/core/logging.py +++ b/gusto/core/logging.py @@ -70,7 +70,7 @@ def capture_exceptions(exception_type, exception_value, traceback, logger=logger logconsole_level = os.environ.get("GUSTO_CONSOLE_LOG_LEVEL", INFO) log_level_list = [log_level, logfile_level, logconsole_level] log_levels = [ - logging.getLevelNamesMapping().get(x) if isinstance(x, str) + logging.getLevelName(x) if isinstance(x, str) else x for x in log_level_list ]