Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Update litellm/litellm_core_utils/litellm_logging.py

Harshit Jain0341b6fa2bdf
diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py
index b2aee6bd2a0..f5b12b9e0f7 100644
--- a/litellm/litellm_core_utils/litellm_logging.py
+++ b/litellm/litellm_core_utils/litellm_logging.py
@@ -3176,12 +3176,15 @@ class Logging(LiteLLMLoggingBaseClass):
# Keep all non-Langfuse callbacks
filtered.append(cb)
- verbose_logger.debug(
- f"[LANGFUSE DEBUG] Filtered callbacks AFTER filtering: {[self._get_callback_name(cb) for cb in filtered]}"
- )
+ if verbose_logger.isEnabledFor(logging.DEBUG):
+ verbose_logger.debug(
+ "[LANGFUSE DEBUG] Filtered callbacks AFTER filtering: %s",
+ [self._get_callback_name(cb) for cb in filtered],
+ )
if langfuse_logger_found:
verbose_logger.debug(
- f"[LANGFUSE DEBUG] Langfuse logger kept: {self._get_callback_name(langfuse_logger_found)}"
+ "[LANGFUSE DEBUG] Langfuse logger kept: %s",
+ self._get_callback_name(langfuse_logger_found),
)
# After Langfuse filtering, deduplicate remaining callbacks