Managed Service for PostgreSQL API, gRPC: ClusterService.StreamLogs
Same as ListLogs but using server-side streaming. Also allows for 'tail -f' semantics.
gRPC request
rpc StreamLogs (StreamClusterLogsRequest) returns (stream StreamLogRecord)
StreamClusterLogsRequest
{
"cluster_id": "string",
"column_filter": [
"string"
],
"service_type": "ServiceType",
"from_time": "google.protobuf.Timestamp",
"to_time": "google.protobuf.Timestamp",
"record_token": "string",
"filter": "string"
}
Field |
Description |
cluster_id |
string Required field. Required. ID of the PostgreSQL cluster. |
column_filter[] |
string Columns from logs table to get in the response. |
service_type |
enum ServiceType
|
from_time |
Start timestamp for the logs request. |
to_time |
End timestamp for the logs request. |
record_token |
string Record token. Set |
filter |
string A filter expression that filters resources listed in the response.
|
StreamLogRecord
{
"record": {
"timestamp": "google.protobuf.Timestamp",
"message": "map<string, string>"
},
"next_record_token": "string"
}
Field |
Description |
record |
One of the requested log records. |
next_record_token |
string This token allows you to continue streaming logs starting from the exact |
LogRecord
Field |
Description |
timestamp |
Log record timestamp in RFC3339 |
message |
object (map<string, string>) Contents of the log record. |