'This function should digest the contents of one line at a time, updating
object\'s state variables. Takes a single argument, the line to be parsed.'

def parse_line(self, line):

    try:
        regMatch = self.reg.match(line)
        if regMatch:
            linebits = regMatch.groupdict()
            level = linebits['loglevel']
            if (level == 'notice'):
                self.notice += 1
            elif (level == 'warn'):
                self.warn += 1
            elif (level == 'error'):
                self.error += 1
            elif (level == 'crit'):
                self.crit += 1
            else:
                self.other += 1
        else:
            raise LogsterParsingException('regmatch    failed    to    match')
    except Exception as e:
        raise LogsterParsingException(('regmatch    or    contents    failed    with    %s' % e))
