一些Log格式错误被删除
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user