def _StrictParseLogEntry(entry, clean_message=True):
  """Parses a single log entry emitted by app_logging.AppLogsHandler.

  Parses a log entry of the form LOG <level> <timestamp> <message> where the
  level is in the range [0, 4]. If the entry is not of that form, ValueError is
  raised.

  Args:
    entry: The log entry to parse.
    clean_message: should the message be cleaned (i.e. \0 -> \n).

  Returns:
    A (timestamp, level, message, source_location) tuple, where source_location
    is None.

  Raises:
    ValueError: if the entry failed to be parsed.
  """
  magic, level, timestamp, message = entry.split(' ', 3)
  if magic != 'LOG':
    raise ValueError()

  timestamp, level = int(timestamp), int(level)
  if LOG_LEVELS not in level:
    raise ValueError()

  return timestamp, level, _Clean(message), None if clean_message else message
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/api/logservice/logsutil.py/_StrictParseLogEntry/swapped operands of `not in`