def _PrintLogLine(self, text):
    'Override PrintLogLine method to use self.filter.'
    if self.filter:
        output_lines = text.splitlines()
        for line in output_lines:
            for match in self.filter:
                if line.startswith(match):
                    self.out.Print(line)
                    break
    else:
        self.out.Print(text)
Override PrintLogLine method to use self.filter.
def _PrintLogLine(self, text):
    
    if self.filter:
        output_lines = text.splitlines()
        for line in output_lines:
            for match in self.filter:
                if line.startswith(match):
                    self.out.Print(line)
                    break
    else:
        self.out.Print(text)