# Google Cloud Logging API . projects . logs

## Instance Methods

Returns the entries Resource.

Returns the sinks Resource.

Deletes a log and all its log entries. The log will reappear if it receives new entries.

Lists the logs in the project. Only logs that have entries are listed.

Retrieves the next page of results.

### Method Details

`delete(projectsId, logsId, x__xgafv=None)`

    Deletes a log and all its log entries. The log will reappear if it receives new entries.

    Args:
      projectsId: string, Part of `logName`. The resource name of the log to be deleted. (required)
      logsId: string, Part of `logName`. See documentation of `projectsId`. (required)
      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
      }

`list(projectsId, pageSize=None, serviceName=None, pageToken=None, x__xgafv=None, serviceIndexPrefix=None)`

    Lists the logs in the project. Only logs that have entries are listed.

    Args:
      projectsId: string, Part of `projectName`. The resource name of the project whose logs are requested. If both `serviceName` and `serviceIndexPrefix` are empty, then all logs with entries in this project are listed. (required)
      pageSize: integer, The maximum number of results to return.
      serviceName: string, If not empty, this field must be a log service name such as `"compute.googleapis.com"`. Only logs associated with that that log service are listed.
      pageToken: string, An opaque token, returned as `nextPageToken` by a prior `ListLogs` operation. If `pageToken` is supplied, then the other fields of this request are ignored, and instead the previous `ListLogs` operation is continued.
      x__xgafv: string, V1 error format.
      serviceIndexPrefix: string, The purpose of this field is to restrict the listed logs to those with entries of a certain kind. If `serviceName` is the name of a log service, then this field may contain values for the log service's indexes. Only logs that have entries whose indexes include the values are listed. The format for this field is `"/val1/val2.../valN"`, where `val1` is a value for the first index, `val2` for the second index, etc. An empty value (a single slash) for an index matches all values, and you can omit values for later indexes entirely.

    Returns:
      An object of the form:

        { # Result returned from ListLogs.
        "nextPageToken": "A String", # If there are more results, then `nextPageToken` is returned in the response. To get the next batch of logs, use the value of `nextPageToken` as `pageToken` in the next call of `ListLogs`. If `nextPageToken` is empty, then there are no more results.
        "logs": [ # A list of log descriptions matching the criteria.
          { # _Output only._ Describes a log, which is a named stream of log entries.
            "payloadType": "A String", # _Optional_. A URI representing the expected payload type for log entries.
            "displayName": "A String", # _Optional._ The common name of the log. Example: `"request_log"`.
            "name": "A String", # The resource name of the log. Example: `"/projects/my-gcp-project-id/logs/LOG_NAME"`, where `LOG_NAME` is the URL-encoded given name of the log. The log includes those log entries whose `LogEntry.log` field contains this given name. To avoid name collisions, it is a best practice to prefix the given log name with the service name, but this is not required. Examples of log given names: `"appengine.googleapis.com/request_log"`, `"apache-access"`.
          },
        ],
      }

`list_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.