Skip to content

logging

Setup project wide loggers.

This is a thin wrapper around Python's logging module. It supports colored logging.

SingleLevelFilter

Bases: Filter

Filter levels.

__init__(passlevel: int, reject: bool) -> None

Initialize the filter with the level to pass and whether to reject it.

filter(record: logging.LogRecord) -> bool

Return whether the record should pass the filter.

configure_logging(stream: TextIO, level: int, use_color: bool) -> None

Configure application logging.

get_logger(name: str) -> logging.Logger

Get a logger with the given name.