improve logging

This commit is contained in:
Kenneth Kehl
2025-09-04 12:30:52 -07:00
parent c6e1e662ad
commit ded60409a8
11 changed files with 42 additions and 51 deletions

View File

@@ -80,7 +80,9 @@ class RedisClient:
try:
return self.scripts["delete-keys-by-pattern"](args=[pattern])
except Exception as e:
current_app.logger.exception(f"Exception in delete_by_pattern pattern={pattern}")
current_app.logger.exception(
f"Exception in delete_by_pattern pattern={pattern}"
)
self.__handle_exception(
e, raise_exception, "delete-by-pattern", pattern
)
@@ -130,7 +132,9 @@ class RedisClient:
result = pipe.execute()
return result[2] > limit
except Exception as e:
current_app.logger.exception(f"Exception in exceeded_rate_limit cache_key {cache_key} limit = {limit}")
current_app.logger.exception(
f"Exception in exceeded_rate_limit cache_key {cache_key} limit = {limit}"
)
self.__handle_exception(
e, raise_exception, "rate-limit-pipeline", cache_key
)