diff --git a/backend/app/main.py b/backend/app/main.py index 8f291ea..e7c97f3 100755 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -18,6 +18,19 @@ logging.basicConfig( datefmt="%Y-%m-%d %H:%M:%S" ) logger = logging.getLogger(__name__) + + +class HealthCheckFilter(logging.Filter): + """Filter out health check endpoint logs from uvicorn access log.""" + def filter(self, record: logging.LogRecord) -> bool: + message = record.getMessage() + if "GET /health" in message: + return False + return True + + +# Filter out health check logs from uvicorn access log +logging.getLogger("uvicorn.access").addFilter(HealthCheckFilter()) from app.websocket.manager import ConnectionManager from app.websocket.handlers import handle_analyze_message from app.services.gemini_service import GeminiService