From d362fc6eec9b34250906d12cc8936a927423abd2 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 5 Mar 2024 13:37:24 -0800 Subject: [PATCH] fix(utils.py): fix logging --- litellm/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index d4d85cad1..5937c072d 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -772,10 +772,10 @@ class ImageResponse(OpenAIObject): ############################################################ -def print_verbose(print_statement): +def print_verbose(print_statement, logger_only: bool = False): try: verbose_logger.debug(print_statement) - if litellm.set_verbose: + if litellm.set_verbose == True and logger_only == False: print(print_statement) # noqa except: pass @@ -1739,7 +1739,8 @@ class Logging: ) if callable(callback): # custom logger functions print_verbose( - f"Making async function logging call for {callback}, result={result} - {self.model_call_details}" + f"Making async function logging call for {callback}, result={result} - {self.model_call_details}", + logger_only=True, ) if self.stream: if (