def RecordFromLine(line):
 try:
  (created, level, unused_source_location, message) = _StrictParseLogEntry(line, clean_message=False)
  message = Stripnl(message)
  return LoggingRecord(level, created, message, None)
 except ValueError:
  return StderrRecord(line)

def RecordFromLine ( line ) : try : ( created , level , unused_source_location , message ) = _StrictParseLogEntry ( line , clean_message = False ) message = Stripnl ( message ) return LoggingRecord ( level , created , message , None ) except ValueError : return StderrRecord ( line )
create the correct type of record based on what the line looks like .