docs: def parse_file(self, sourcepath):
          """Parse a file into a LogData object"""
          # Get regex objects:
          self.date_regex = re.compile(
                  r'{}'.format(self.format_regex))
          if self.backup_format_regex:
              self.backup_date_regex = re.compile(
                      r'{}'.format(self.backup_format_regex))
          data = {}
          data['entries'] = []
          data['parser'] = self.name
          data['source_path'] = sourcepath
          data['source_file'] = sourcepath.split('/')[-1]
  
          # Set our start year:
          data['source_file_mtime'] = os.path.getmtime(data['source_path'])
          timestamp = datetime.fromtimestamp(data['source_file_mtime'])
          data['source_file_year'] = timestamp.year
          entryyear = timestamp.year
          currentmonth = '99'
          if self.datestamp_type == 'nodate':
              self.datedata = {}
              self.datedata['timestamp'] = timestamp
              self.datedata['entry_time'] = int(timestamp.strftime('%H%M%S'))
  
          # Set our timezone
          if not self.tzone:
              self.backuptzone = logdissect.utils.get_local_tzone()
  
          # Parsing works in reverse. This helps with multi-line entries,
          # and logs that span multiple years (December to January shift).
  
          # Get our lines:
          fparts = sourcepath.split('.')
          if fparts[-1] == 'gz':
              with gzip.open(sourcepath, 'r') as logfile:
                  loglines = reversed(logfile.readlines())
          else:
              with open(str(sourcepath), 'r') as logfile:
                  loglines = reversed(logfile.readlines())
  
          # Parse our lines:
          for line in loglines:
              ourline = line.rstrip()
  
              # Send the line to self.parse_line
              entry = self.parse_line(ourline)
  
              if entry:
                  if 'date_stamp' in self.fields:
                      # Check for Dec-Jan jump and set the year:
                      if self.datestamp_type == 'standard':
                          if int(entry['month']) > int(currentmonth):
                              entryyear = entryyear - 1
                          currentmonth = entry['month']
                      
                          entry['numeric_date_stamp'] = str(entryyear) \
                                  + entry['month'] + entry['day'] + \
                                  entry['tstamp']
                          entry['year'] = str(entryyear)
                      if self.tzone:
                          entry['tzone'] = self.tzone
                      else:
                          entry['tzone'] = self.backuptzone
                      entry = logdissect.utils.get_utc_date(entry)
                  entry['raw_text'] = ourline
                  entry['source_path'] = data['source_path']
  
                  # Append current entry
                  data['entries'].append(entry)
  
              else:
                  continue
  
          # Write the entries to the log object
          data['entries'].reverse()
          return data