diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index f57dd3b81..b1db82a77 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -28,6 +28,7 @@ from litellm.cost_calculator import _select_model_name_for_cost_calc from litellm.integrations.custom_guardrail import CustomGuardrail from litellm.integrations.custom_logger import CustomLogger from litellm.litellm_core_utils.redact_messages import ( + redact_message_input_output_from_custom_logger, redact_message_input_output_from_logging, ) from litellm.rerank_api.types import RerankResponse @@ -1395,6 +1396,9 @@ class Logging: call_type=self.call_type, ) elif isinstance(callback, CustomLogger): + result = redact_message_input_output_from_custom_logger( + result=result, litellm_logging_obj=self, custom_logger=callback + ) self.model_call_details, result = await callback.async_logging_hook( kwargs=self.model_call_details, result=result,