mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
refactor: replace .error() with .exception() logging for better debugging on sentry
This commit is contained in:
parent
62365835f3
commit
2874b94fb1
35 changed files with 242 additions and 253 deletions
|
@ -235,10 +235,8 @@ class BraintrustLogger(CustomLogger):
|
|||
except httpx.HTTPStatusError as e:
|
||||
raise Exception(e.response.text)
|
||||
except Exception as e:
|
||||
verbose_logger.error(
|
||||
"Error logging to braintrust - Exception received - {}\n{}".format(
|
||||
str(e), traceback.format_exc()
|
||||
)
|
||||
verbose_logger.exception(
|
||||
"Error logging to braintrust - Exception received - {}".format(str(e))
|
||||
)
|
||||
raise e
|
||||
|
||||
|
@ -362,10 +360,8 @@ class BraintrustLogger(CustomLogger):
|
|||
except httpx.HTTPStatusError as e:
|
||||
raise Exception(e.response.text)
|
||||
except Exception as e:
|
||||
verbose_logger.error(
|
||||
"Error logging to braintrust - Exception received - {}\n{}".format(
|
||||
str(e), traceback.format_exc()
|
||||
)
|
||||
verbose_logger.exception(
|
||||
"Error logging to braintrust - Exception received - {}".format(str(e))
|
||||
)
|
||||
raise e
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue