'Get all of the errors from the log files.'

def errors(self):

    error_found = 0
    if CONF.log_dir:
        logs = [x for x in os.listdir(CONF.log_dir) if x.endswith('.log')]
        for file in logs:
            log_file = os.path.join(CONF.log_dir, file)
            lines = [line.strip() for line in open(log_file, 'r')]
            lines.reverse()
            print_name = 0
            for (index, line) in enumerate(lines):
                if (line.find('    ERROR    ') > 0):
                    error_found += 1
                    if (print_name == 0):
                        print((log_file + ':-'))
                        print_name = 1
                    print((_('Line    %(dis)d    :    %(line)s') % {'dis': (len(lines) - index), 'line': line}))
    if (error_found == 0):
        print(_('No    errors    in    logfiles!'))
