update
This commit is contained in:
parent
80ce826884
commit
22fb08795a
@ -88,7 +88,9 @@ async def health_check():
|
|||||||
|
|
||||||
@app.exception_handler(Exception)
|
@app.exception_handler(Exception)
|
||||||
async def exception_handler(request, exc):
|
async def exception_handler(request, exc):
|
||||||
logging.exception(f"API异常: {str(exc)}")
|
env = "测试环境" if settings.DEBUG else "生产环境"
|
||||||
|
|
||||||
|
logging.exception(f"【{env}】API异常: {str(exc)}")
|
||||||
|
|
||||||
# 发送企业微信消息
|
# 发送企业微信消息
|
||||||
wecom_bot = WecomBot(settings.URL_WECOMBOT_SYS_EXCEPTION)
|
wecom_bot = WecomBot(settings.URL_WECOMBOT_SYS_EXCEPTION)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user