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
{
"cluster_id": "string",
"column_filter": [
"string"
],
"service_type": "ServiceType",
"from_time": "google.protobuf.Timestamp",
"to_time": "google.protobuf.Timestamp",
"page_size": "int64",
"page_token": "string",
"always_next_page_token": "bool"
}
Field |
Description |
cluster_id |
string Required field. ID of the cluster to request logs for. To get this ID, make a ClusterService.List request. |
column_filter[] |
string Columns from the logs table to request. |
service_type |
enum ServiceType The log type.
|
from_time |
Start timestamp for the logs request. |
to_time |
End timestamp for the logs request. |
page_size |
int64 The maximum number of results per page to return. If the number of available results is larger than |
page_token |
string Page token that can be used to iterate through multiple pages of results. To get the next page of results, set |
always_next_page_token |
bool Option that controls the behavior of result pagination. |
ListClusterLogsResponse
{
"logs": [
{
"timestamp": "google.protobuf.Timestamp",
"message": "map<string, string>"
}
],
"next_page_token": "string"
}
Field |
Description |
logs[] |
Requested log records. |
next_page_token |
string The token that can be used to get the next page of results. If the number of results is larger than ListClusterLogsRequest.page_size, use the Each of the subsequent ClusterService.ListLogs requests should use the This value is interchangeable with StreamLogRecord.next_record_token from ClusterService.StreamLogs method. |
LogRecord
A single log record.
Field |
Description |
timestamp |
Timestamp of the log record. |
message |
object (map<string, string>) Contents of the log record. |