chore: add /mcp/health filter and configure uvicorn.access logging
All checks were successful
CVE Scan & Docker Build / security-scan (push) Successful in 53s
CVE Scan & Docker Build / build-and-push (push) Successful in 2m29s

Add /mcp/health to suppress paths in log_filters.py to demote health
probe logs to DEBUG level. Configure uvicorn.access logger in settings.py
to manage access logs directly instead of relying on mcp_server internal
filters. Update comments to reflect that uvicorn access is now managed
in project settings.
This commit is contained in:
2026-05-16 18:19:58 -04:00
parent 9629ca595d
commit 2a45cb2622
2 changed files with 7 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ _SUPPRESS_PATHS = frozenset(
"/ready",
"/healthz",
"/metrics",
"/mcp/health",
}
)

View File

@@ -389,8 +389,7 @@ LOGGING = {
"filters": {
# Demotes successful health-probe access log lines from INFO to
# DEBUG so production INFO output stays signal-only. Applied to
# django.server and gunicorn.access; uvicorn does its own thing
# via the structlog-style filter in mcp_server.
# django.server, gunicorn.access, and uvicorn.access.
"suppress_health_access": {
"()": "mnemosyne.log_filters.SuppressHealthAccessFilter",
},
@@ -458,6 +457,11 @@ LOGGING = {
"level": DJANGO_LOGGING_LEVEL,
"propagate": False,
},
"uvicorn.access": {
"handlers": ["access"],
"level": LOGGING_LEVEL,
"propagate": False,
},
# Noisy library internals — pin to WARNING regardless of root level
# so we don't drown in HTTP-client debug spam when LOGGING_LEVEL=DEBUG.
"httpx": {"handlers": ["console"], "level": "WARNING", "propagate": False},