mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 11:00:09 +08:00
The backend was logging every request (the chatty frontend polling of /settings, /tools, /knowledge/list, /settings/llm-options, ...) as `::1:0 - "GET ... 200 OK"`. uvicorn's per-request access log was only disabled in run_server.py (access_log=False); the `deeptutor start` launcher and the Docker entrypoints invoked uvicorn directly with it still on, so the 200s leaked. - launcher.py + Dockerfile (production start-backend.sh and the dev supervisord program): add `--no-access-log` so all launch paths match run_server.py. - Funnel access logging through the existing selective_access_log middleware (non-200 only), but log via a `deeptutor.access` logger with its own INFO stdout handler (propagate=False). Previously it used `uvicorn.access`, which has no handler once uvicorn's access log is off, and the root console handler runs at WARNING — so non-200s were being silently dropped. Now 200s are quiet and 4xx/5xx still surface. - Rewrite the middleware test to capture on the deeptutor.access logger directly (it no longer propagates to root). Verified: live server with --no-access-log logs nothing for 200s and prints `127.0.0.1 - "GET /api/v1/... HTTP/1.1" 404` for a 404. ruff + pytest (2447) green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>