import logging class IgnoreHealth(logging.Filter): def __init__(self, name: str = ""): super().__init__(name) def filter(self, record: logging.LogRecord) -> bool: return "/health" not in record.getMessage()