def METHOD_NAME(self, name, line) -> bool:
    if self.role == "taskmanager":
        if name.startswith("taskmanager"):
            if len(line) < 28:
                return False
            if not line[:2].isnumeric():
                return False
            log_level = line[24:28]
            if log_level in ["INFO", "WARN", "ERROR"] and log_level != "INFO":
                return True
        else:
            if len(line) < 22:
                return False
            log_level = line[18:22]
            if log_level in ["INFO", "WARN", "ERROR"] and log_level != "INFO":
                for filter_msg in self.taskmanager_ignore_errors:
                    if line.find(filter_msg) != -1:
                        return False
                return True
    else:
        if (line.startswith("W") or line.startswith("E")) and line[1].isnumeric():
            return True
    return False