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]

add message_logging on Custom Logger

Ishaan Jaff715387c3c0f7
diff --git a/litellm/integrations/custom_logger.py b/litellm/integrations/custom_logger.py
index ce0caf32bcc..e5d3dfd56c5 100644
--- a/litellm/integrations/custom_logger.py
+++ b/litellm/integrations/custom_logger.py
@@ -15,7 +15,8 @@ from litellm.types.utils import AdapterCompletionStreamWrapper, ModelResponse
class CustomLogger: # https://docs.litellm.ai/docs/observability/custom_callback#callback-class
# Class variables or attributes
- def __init__(self) -> None:
+ def __init__(self, message_logging: bool = True) -> None:
+ self.message_logging = message_logging
pass
def log_pre_api_call(self, model, messages, kwargs):