From d5744942d0a31202e13eaf08ee8943bcf5a5bfd6 Mon Sep 17 00:00:00 2001 From: Dolpher Du Date: Tue, 5 Nov 2024 11:11:15 +0000 Subject: [PATCH] Remove health check log Signed-off-by: Dolpher Du --- comps/cores/mega/http_service.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/comps/cores/mega/http_service.py b/comps/cores/mega/http_service.py index 9efc55e3f..0f1bd1f9a 100644 --- a/comps/cores/mega/http_service.py +++ b/comps/cores/mega/http_service.py @@ -1,6 +1,7 @@ # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +import logging import re from typing import Optional @@ -131,6 +132,7 @@ async def start_server(self, **kwargs): **self.uvicorn_kwargs, ) ) + logging.getLogger("uvicorn.access").addFilter(lambda record: "/v1/health_check" not in record.getMessage()) self.logger.info(f"Uvicorn server setup on port {self.primary_port}") await self.server.setup_server() self.logger.info("HTTP server setup successful")