From bf7d5cd4321f3425fb18c3a2ed4854a745ee1b33 Mon Sep 17 00:00:00 2001 From: y0nei Date: Tue, 3 Oct 2023 10:32:34 +0200 Subject: [PATCH] [fix] logs: Proper member name mapping for ValidLogLevels `_member_names_` is not part of the Enum documented public API, instead use `__members__`. --- searx/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/__init__.py b/searx/__init__.py index 62df1adc5..94eb7998b 100644 --- a/searx/__init__.py +++ b/searx/__init__.py @@ -40,7 +40,7 @@ LOG_FORMAT_DEBUG = '%(levelname)-7s %(name)-30.30s: %(message)s' LOG_FORMAT_PROD = '%(asctime)-15s %(levelname)s:%(name)s: %(message)s' searx_loglevel = settings['general']['log_level'] -if searx_loglevel.upper() in ValidLogLevels._member_names_: +if searx_loglevel.upper() in list(ValidLogLevels.__members__): LOG_LEVEL_PROD = ValidLogLevels[searx_loglevel.upper()].name else: LOG_LEVEL_PROD = logging.WARNING