Files
DeepTutor/tests/api
Bingxi Zhao (Frank) 1d9a4a904d fix(logging): silence routine 200 access-log spam on all launch paths
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>
2026-06-20 22:01:01 +08:00
..
2026-06-11 20:03:34 +08:00
2026-06-11 20:03:34 +08:00
2026-06-18 00:22:48 +08:00
2026-06-17 10:50:44 +08:00
2026-06-17 10:50:44 +08:00
2026-06-11 20:03:34 +08:00
2026-06-11 20:03:34 +08:00
2026-05-08 02:36:24 +08:00
2026-06-18 00:22:48 +08:00
2026-06-18 22:16:31 +08:00
2026-06-18 00:22:48 +08:00