From 989bd9aa9574496cdb2ba4770697756f133028da Mon Sep 17 00:00:00 2001 From: rzeta-10 Date: Mon, 23 Mar 2026 13:48:17 +0530 Subject: [PATCH] check error message and add initialization log for Akto Logger --- litellm/integrations/akto/akto_logger.py | 4 ++-- litellm/litellm_core_utils/litellm_logging.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/litellm/integrations/akto/akto_logger.py b/litellm/integrations/akto/akto_logger.py index 12b6bdf354a..69a7e7402df 100644 --- a/litellm/integrations/akto/akto_logger.py +++ b/litellm/integrations/akto/akto_logger.py @@ -197,8 +197,8 @@ class AktoLogger(CustomLogger): "status": "unhealthy", "error_message": f"Akto returned status {response.status_code}", } - except Exception as e: - return {"status": "unhealthy", "error_message": str(e)} + except Exception: + return {"status": "unhealthy", "error_message": "Akto health check failed"} # ── Logging callbacks ── diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index 405b1e41f0f..44853cdba74 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -3711,6 +3711,7 @@ def set_callbacks(callback_list, function_id=None): # noqa: PLR0915 print_verbose("Initialized Greenscale Logger") elif callback == "akto": aktoLogger = AktoLogger() + print_verbose("Initialized Akto Logger") elif callable(callback): customLogger = CustomLogger() except Exception as e: