log_parser.py
changeset 65 8b50694f841e
parent 64 cdb6403c2498
child 83 a34e9f56ddda
equal deleted inserted replaced
64:cdb6403c2498 65:8b50694f841e
    40 
    40 
    41     def parse_lines (self, lines, date=None, starting_offset=None) :
    41     def parse_lines (self, lines, date=None, starting_offset=None) :
    42         """
    42         """
    43             Parse the given lines, yielding LogEvents. 
    43             Parse the given lines, yielding LogEvents. 
    44         """
    44         """
    45         
    45 
    46         for offset, line in enumerate(lines) :
    46         for offset, line in enumerate(lines) :
    47             # status lines
    47             # status lines
    48             if line.startswith('---') :
    48             if line.startswith('---') :
    49                 # XXX: handle these
    49                 # XXX: handle these
    50                 continue
    50                 continue
    63                 
    63                 
    64                 # now localize with timezone
    64                 # now localize with timezone
    65                 dtz = self.tz.localize(dt)
    65                 dtz = self.tz.localize(dt)
    66 
    66 
    67                 # offset?
    67                 # offset?
    68                 if offset :
    68                 if starting_offset :
    69                     offset = starting_offset + offset
    69                     offset = starting_offset + offset
    70 
    70 
    71                 else :
    71                 else :
    72                     offset = None
    72                     offset = None
    73 
    73