diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index 07cb1d8662b..ca8a1931648 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -4161,10 +4161,14 @@ class StandardLoggingPayloadSetup: # Get the actual s3_path from the configured cold storage logger instance s3_path = "" # default value - # Get the actual logger instance from the logger name - custom_logger = litellm.logging_callback_manager.get_active_custom_logger_for_callback_name(configured_cold_storage_logger) - if custom_logger and hasattr(custom_logger, 's3_path') and custom_logger.s3_path: - s3_path = custom_logger.s3_path + # Try to get the actual logger instance from the logger name + try: + custom_logger = litellm.logging_callback_manager.get_active_custom_logger_for_callback_name(configured_cold_storage_logger) + if custom_logger and hasattr(custom_logger, 's3_path') and custom_logger.s3_path: + s3_path = custom_logger.s3_path + except Exception: + # If any error occurs in getting the logger instance, use default empty s3_path + pass s3_object_key = get_s3_object_key( s3_path=s3_path, # Use actual s3_path from logger configuration