Managed Service for MySQL API, gRPC: ClusterService.ListLogs
Retrieves logs for a cluster.
Alternatively, logs can be streamed using StreamLogs.
gRPC request
rpc ListLogs (ListClusterLogsRequest) returns (ListClusterLogsResponse)
ListClusterLogsRequest
{
"clusterId": "string",
"columnFilter": [
"string"
],
"serviceType": "ServiceType",
"fromTime": "google.protobuf.Timestamp",
"toTime": "google.protobuf.Timestamp",
"pageSize": "int64",
"pageToken": "string",
"alwaysNextPageToken": "bool"
}
Field |
Description |
clusterId |
string Required field. ID of the cluster to request logs for. To get this ID, make a ClusterService.List request. |
columnFilter[] |
string Columns from the logs table to request. |
serviceType |
enum ServiceType The log type.
|
fromTime |
Start timestamp for the logs request. |
toTime |
End timestamp for the logs request. |
pageSize |
int64 The maximum number of results per page to return. If the number of available results is larger than |
pageToken |
string Page token that can be used to iterate through multiple pages of results. To get the next page of results, set |
alwaysNextPageToken |
bool Option that controls the behavior of result pagination. |
ListClusterLogsResponse
{
"logs": [
{
"timestamp": "google.protobuf.Timestamp",
"message": "string"
}
],
"nextPageToken": "string"
}
Field |
Description |
logs[] |
Requested log records. |
nextPageToken |
string The token that can be used to get the next page of results. If the number of results is larger than ListClusterLogsRequest.pageSize, use the Each of the subsequent ClusterService.ListLogs requests should use the This value is interchangeable with StreamLogRecord.nextRecordToken from ClusterService.StreamLogs method. |
LogRecord
A single log record.
Field |
Description |
timestamp |
Timestamp of the log record. |
message |
string Contents of the log record. |