From 15dc5df12c2569b1e334e6153c605e522dccafbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=B1=BC=E5=BC=80=E5=8F=91?= Date: Wed, 27 May 2026 15:35:51 +0800 Subject: [PATCH] =?UTF-8?q?chore(log):=20=E6=97=A5=E5=BF=97=E5=8F=AA?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - uvicorn access_log 设为 False,关闭 HTTP 访问日志 - .env.example 中 LOG_LEVEL 默认改为 ERROR --- python-api/.env.example | 2 +- python-api/app/main.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/python-api/.env.example b/python-api/.env.example index 00b81b3..44a55e8 100644 --- a/python-api/.env.example +++ b/python-api/.env.example @@ -79,4 +79,4 @@ SMS_BASE_URL=https://bjksmtn.b2m.cn/inter/sendSingleSMS # === 日志配置 === # 生产环境建议 INFO -LOG_LEVEL=DEBUG +LOG_LEVEL=ERROR diff --git a/python-api/app/main.py b/python-api/app/main.py index 3755412..1532248 100644 --- a/python-api/app/main.py +++ b/python-api/app/main.py @@ -361,6 +361,7 @@ def main(): workers=settings.WORKERS if not settings.DEBUG else 1, reload=settings.DEBUG, log_level=settings.LOG_LEVEL.lower(), + access_log=False, )