From 8aa87bd6ce594ea86152feca7b5a63c07be3c5e9 Mon Sep 17 00:00:00 2001 From: Sven Rosenzweig Date: Wed, 9 Aug 2023 15:51:06 +0200 Subject: [PATCH] Enable DEBUG logging via logger configuration A separate configuration 'DEBUG' in the DEFAULT section of openstack service configuration is required in order to enable DEFAULT log level. With this commit the loglevel should be entirely configurable via logger configuration. Remove "handle-all-exception" from the rate_limit logging wrapper class. --- rate_limit/log.py | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/rate_limit/log.py b/rate_limit/log.py index 7fa288b..4488675 100644 --- a/rate_limit/log.py +++ b/rate_limit/log.py @@ -35,26 +35,13 @@ def __init__(self, name, product_name='rate_limit'): pass def info(self, msg): - try: - self.__logger.info(msg) - except Exception: - pass + self.__logger.info(msg) def warning(self, msg): - try: - self.__logger.warning(msg) - except Exception: - pass + self.__logger.warning(msg) def error(self, msg): - try: - self.__logger.error(msg) - except Exception: - pass + self.__logger.error(msg) def debug(self, msg): - try: - if CONF.debug or os.getenv("DEBUG", False): - self.__logger.debug(msg) - except Exception: - pass + self.__logger.debug(msg)