mirror of
https://github.com/tiennm99/litellm.git
synced 2026-06-17 14:48:44 +00:00
Merge pull request #24826 from BerriAI/litellm_/dazzling-jackson
[Fix] Failure callbacks silently skipped when customLogger not initialized
This commit is contained in:
@@ -3000,9 +3000,10 @@ class Logging(LiteLLMLoggingBaseClass):
|
||||
litellm_call_id=self.model_call_details["litellm_call_id"],
|
||||
print_verbose=print_verbose,
|
||||
)
|
||||
if (
|
||||
callable(callback) and customLogger is not None
|
||||
): # custom logger functions
|
||||
if callable(callback): # custom logger functions
|
||||
global customLogger
|
||||
if customLogger is None:
|
||||
customLogger = CustomLogger()
|
||||
customLogger.log_event(
|
||||
kwargs=self.model_call_details,
|
||||
response_obj=result,
|
||||
@@ -3143,9 +3144,10 @@ class Logging(LiteLLMLoggingBaseClass):
|
||||
start_time=start_time,
|
||||
end_time=end_time,
|
||||
) # type: ignore
|
||||
if (
|
||||
callable(callback) and customLogger is not None
|
||||
): # custom logger functions
|
||||
if callable(callback): # custom logger functions
|
||||
global customLogger
|
||||
if customLogger is None:
|
||||
customLogger = CustomLogger()
|
||||
await customLogger.async_log_event(
|
||||
kwargs=self.model_call_details,
|
||||
response_obj=result,
|
||||
|
||||
Reference in New Issue
Block a user