def _set_filter(name: str):
    """Filter is used to filter loguru.logger by the logger type,
    allowing to create multiple 'virtual' loggers.
    'logger_name' is the key used on log record 'extra' fields to identify 
    the type of logger, thus used on logger.bind calls to fetch each virtual logger.
    """
    def record_filter(record):
        return record["extra"].get("logger_name") == name
    return record_filter