一些Log格式错误被删除

This commit is contained in:
2025-11-07 15:52:06 +08:00
parent a1b3f51b61
commit 477fbf1876
6 changed files with 19 additions and 17 deletions

View File

@@ -76,7 +76,7 @@ async def root():
@app.exception_handler(Exception)
async def global_exception_handler(request, exc):
"""全局异常处理"""
config.Log("Error", f"未捕获的异常: {exc}", exc_info=True)
config.Log("Error", f"未捕获的异常: {exc}\n{format_traceback_info()}")
return JSONResponse(
status_code=500,
content={"error": "Internal Server Error", "detail": str(exc)}