'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()
            status = int(linebits['http_status_code'])
            squid_code = linebits['squid_code']
            size = int(linebits['size'])
            if (status < 200):
                self.http_1xx += 1
            elif (status < 300):
                self.http_2xx += 1
            elif (status < 400):
                self.http_3xx += 1
            elif (status < 500):
                self.http_4xx += 1
            else:
                self.http_5xx += 1
            if (squid_code in self.squid_codes):
                self.squid_codes[squid_code] += 1
            else:
                self.squid_codes['OTHER'] += 1
            self.size_transferred += size
        else:
            raise LogsterParsingException('regmatch    failed    to    match')
    except Exception as e:
        raise LogsterParsingException(('regmatch    or    contents    failed    with    %s' % e))
