新功能: 完善日志信息

This commit is contained in:
李强
2023-01-24 20:43:15 +08:00
parent f75c444699
commit 4804df5079
6 changed files with 158 additions and 59 deletions

View File

@@ -51,6 +51,6 @@ def CustomExceptionHandler(ex, context):
# set_rollback()
# msg = "接口服务器异常,请联系管理员"
elif isinstance(ex, Exception):
logger.error(traceback.format_exc())
logger.exception(traceback.format_exc())
msg = str(ex)
return ErrorResponse(msg=msg, code=code)