Skip to content

get_broker_logger

faststream.log.logging.get_broker_logger #

get_broker_logger(name, default_context, message_id_ln)
Source code in faststream/log/logging.py
def get_broker_logger(
    name: str,
    default_context: Mapping[str, str],
    message_id_ln: int,
) -> logging.Logger:
    logger = logging.getLogger(f"faststream.access.{name}")
    logger.propagate = False
    logger.addFilter(ExtendedFilter(default_context, message_id_ln))
    logger.setLevel(logging.INFO)
    return logger