INNER CODE UNIT · Python

LogFilter

br3ndonland/inboard · inboard/logging_conf.py:58

class LogFilter(logging.Filter):
    """Subclass of `logging.Filter` used to filter log messages.
    ---

    Filters identify log messages to filter out, so that the logger does not log
    messages containing any of the filters. If any matches are present in a log
    message, the logger will not output the message.

    The environment variable `LOG_FILTERS` can be used to specify filters as a
    comma-separated string, like `LOG_FILTERS="/health, /heartbeat"`. To then
    add the filters to a class instance, the `LogFilter.set_filters()`
    method can produce the set of filters from the environment variable value.
    """

    __slots__: tuple[str, str, str] = "filters", "name", "nlen"

    def __init__(
        self,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…