Parse the logfile.

        Ask each filter if it accepts the line. It will only be printed if all
        filters accept the line.

def run(self, arguments=None):
        """
        Parse the logfile.

        Ask each filter if it accepts the line. It will only be printed if all
        filters accept the line.
        """
        # add arguments from filter classes before calling superclass run
        for f in self.filters:
            for fa in f.filterArgs:
                self.argparser.add_argument(fa[0], **fa[1])
        # now parse arguments and post-process
        LogFileTool.run(self, arguments)

        self.args = dict((k, self.args[k]
                          if k in ['logfile', 'markers', 'timezone']
                          else self._arrayToString(self.args[k]))
                         for k in self.args)
        # make sure logfile is always a list, even if 1 is provided
        # through sys.stdin
        if not isinstance(self.args['logfile'], list):
            self.args['logfile'] = [self.args['logfile']]

        # require at least 1 log file (either through stdin or as parameter)
        if len(self.args['logfile']) == 0:
            raise SystemExit('Error: Need at least 1 log file, either as '
                             'command line parameter or through stdin.')

        # handle timezone parameter
        if len(self.args['timezone']) == 1:
            self.args['timezone'] = (self.args['timezone'] *
                                     len(self.args['logfile']))
        elif len(self.args['timezone']) == len(self.args['logfile']):
            pass
        elif len(self.args['timezone']) == 0:
            self.args['timezone'] = [0] * len(self.args['logfile'])
        else:
            raise SystemExit('Error: Invalid number of timezone parameters. '
                             'Use either one parameter (for global '
                             'adjustment) or the number of log files '
                             '(for individual adjustments).')

        # create filter objects from classes and pass args
        self.filters = [f(self) for f in self.filters]

        # remove non-active filter objects
        self.filters = [f for f in self.filters if f.active]

        # call setup for each active filter
        for f in self.filters:
            f.setup()

        if self.args['shorten'] is not False:
            if self.args['shorten'] is None:
                self.args['shorten'] = 200

        if self.args['verbose']:
            print("command line arguments")
            for a in self.args:
                print("    %s: %s" % (a, self.args[a]))
            print("\nactive filters: " +
                  ", ".join([f.__class__.__name__ for f in self.filters]))
            print('\n====================')

        # handle markers parameter
        if len(self.args['markers']) == 1:
            marker = self.args['markers'][0]
            if marker == 'enum':
                self.args['markers'] = ['{%i}' % (i + 1)
                                        for i in range(len(self
                                                           .args['logfile']))]
            elif marker == 'alpha':
                self.args['markers'] = ['{%s}' % chr(97 + i)
                                        for i in range(len(self
                                                           .args['logfile']))]
            elif marker == 'none':
                self.args['markers'] = [None for _ in self.args['logfile']]
            elif marker == 'filename':
                self.args['markers'] = ['{%s}' % logfile.name
                                        for logfile in self.args['logfile']]
        elif len(self.args['markers']) == len(self.args['logfile']):
            pass
        else:
            raise SystemExit('Error: Number of markers not the same as '
                             'number of files.')

        # with --human, change to ctime format if not specified otherwise
        if self.args['timestamp_format'] == 'none' and self.args['human']:
            self.args['timestamp_format'] = 'ctime'

        # go through each line and ask each filter if it accepts
        if 'logfile' not in self.args or not self.args['logfile']:
            raise SystemExit('no logfile found.')

        for logevent in self.logfile_generator():
            if self.args['exclude']:
                # print line if any filter disagrees
                if any([not f.accept(logevent) for f in self.filters]):
                    self._outputLine(logevent, self.args['shorten'],
                                     self.args['human'])

            else:
                # only print line if all filters agree
                if all([f.accept(logevent) for f in self.filters]):
                    self._outputLine(logevent, self.args['shorten'],
                                     self.args['human'])

                # if at least one filter refuses to accept any
                # remaining lines, stop
                if any([f.skipRemaining() for f in self.filters]):
                    # if input is not stdin
                    if sys.stdin.isatty():
                        break