favicon 204
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import logging
|
||||
class IgnoreHealth(logging.Filter):
|
||||
def __init__(self, name: str = ""): super().__init__(name)
|
||||
|
||||
class IgnoreHealthAndFavicon(logging.Filter):
|
||||
def __init__(self, name: str = ""):
|
||||
super().__init__(name)
|
||||
|
||||
def filter(self, record: logging.LogRecord) -> bool:
|
||||
return "/health" not in record.getMessage()
|
||||
msg = record.getMessage()
|
||||
return all(p not in msg for p in ["/health", "/favicon.ico"])
|
||||
|
Reference in New Issue
Block a user