一些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

@@ -3,7 +3,7 @@ import asyncio
from starlette.middleware.base import BaseHTTPMiddleware
from starlette.requests import Request
from starlette.responses import Response
from ..Convention.Runtime.GlobalConfig import ProjectConfig
from ..Convention.Runtime.GlobalConfig import *
config = ProjectConfig()
MAX_CONCURRENT_REQUESTS = config.FindItem("max_concurrent_requests", 100)
@@ -24,7 +24,7 @@ class ConcurrencyLimitMiddleware(BaseHTTPMiddleware):
response = await call_next(request)
return response
except Exception as e:
config.Log("Error", f"请求处理错误: {e}", exc_info=True)
config.Log("Error", f"{ConsoleFrontColor.RED}请求处理错误: {e}{ConsoleFrontColor.RESET}")
return Response(
content='{"error": "Internal Server Error"}',
status_code=500,