fix(utils.py): fix logging

This commit is contained in:
Krrish Dholakia 2024-03-05 13:37:24 -08:00
parent c8d1c857b5
commit d362fc6eec

View file

@ -772,10 +772,10 @@ class ImageResponse(OpenAIObject):
############################################################ ############################################################
def print_verbose(print_statement): def print_verbose(print_statement, logger_only: bool = False):
try: try:
verbose_logger.debug(print_statement) verbose_logger.debug(print_statement)
if litellm.set_verbose: if litellm.set_verbose == True and logger_only == False:
print(print_statement) # noqa print(print_statement) # noqa
except: except:
pass pass
@ -1739,7 +1739,8 @@ class Logging:
) )
if callable(callback): # custom logger functions if callable(callback): # custom logger functions
print_verbose( 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 self.stream:
if ( if (