def _StrictParseLogEntry(entry, clean_message=True):
 (magic, level, timestamp, message) = entry.split(' ', 3)
 if (magic != 'LOG'):
  raise ValueError()
 (timestamp, level) = (int(timestamp), int(level))
 if (level not in LOG_LEVELS):
  raise ValueError()
 return (timestamp, level, _Clean(message), (None if clean_message else message))

def _StrictParseLogEntry ( entry , clean_message = True ) : ( magic , level , timestamp , message ) = entry . split ( ' ' , 3 ) if ( magic != 'LOG' ) : raise ValueError ( ) ( timestamp , level ) = ( int ( timestamp ) , int ( level ) ) if ( level not in LOG_LEVELS ) : raise ValueError ( ) return ( timestamp , level , _Clean ( message ) , ( None if clean_message else message ) )
parses a single log entry emitted by app_logging .