def CreateLogResourceName(project, log_id):
  """Creates the full log resource name.

  Args:
    project: The project id, e.g. my-project.
    log_id: The log id, e.g. my-log.

  Returns:
    Log resource, e.g. projects/my-project/logs/my-log.
  """
  # Also handle the case where we already have the correct format.
  if 'projects/' in log_id and 'logs/' in log_id:
    return log_id
  return 'projects/%s/logs/%s' % (project, log_id.replace('/', '%2F'))