Cloud Logging Service, gRPC: LogReadingService.Read
Read log entries from the specified log group.
gRPC request
rpc Read (ReadRequest) returns (ReadResponse)
ReadRequest
{
// Includes only one of the fields `pageToken`, `criteria`
"pageToken": "string",
"criteria": {
"logGroupId": "string",
"resourceTypes": [
"string"
],
"resourceIds": [
"string"
],
"since": "google.protobuf.Timestamp",
"until": "google.protobuf.Timestamp",
"levels": [
"Level"
],
"filter": "string",
"streamNames": [
"string"
],
"pageSize": "int64",
"maxResponseSize": "int64"
}
// end of the list of possible fields
}
Field |
Description |
pageToken |
string Page token. To get the next page of results, set Includes only one of the fields Read selector. |
criteria |
Read criteria. See Criteria for details. Includes only one of the fields Read selector. |
Criteria
Read criteria. Should be used in initial ReadRequest.
Field |
Description |
logGroupId |
string Required field. ID of the log group to return. To get a log group ID make a LogGroupService.List request. |
resourceTypes[] |
string List of resource types to limit log entries to. Empty list disables filter. |
resourceIds[] |
string List of resource IDs to limit log entries to. Empty list disables filter. |
since |
Lower bound of log entries timestamps. |
until |
Upper bound of log entries timestamps. |
levels[] |
enum Level List of log levels to limit log entries to. Empty list disables filter.
|
filter |
string Filter expression. For details about filtering, see documentation. |
streamNames[] |
string List of stream names to limit log entries to. Empty list disables filter. |
pageSize |
int64 The maximum number of results per page to return. |
maxResponseSize |
int64 Limits response to maximum size in bytes. Prevents gRPC resource exhaustion. Default value for max response size is 3.5 MiB |
ReadResponse
{
"logGroupId": "string",
"entries": [
{
"uid": "string",
"resource": {
"type": "string",
"id": "string"
},
"timestamp": "google.protobuf.Timestamp",
"ingestedAt": "google.protobuf.Timestamp",
"savedAt": "google.protobuf.Timestamp",
"level": "Level",
"message": "string",
"jsonPayload": "google.protobuf.Struct",
"streamName": "string"
}
],
"nextPageToken": "string",
"previousPageToken": "string"
}
Field |
Description |
logGroupId |
string Log group ID the read was performed from. |
entries[] |
List of matching log entries. |
nextPageToken |
string Token for getting the next page of the log entries. After getting log entries initially with Criteria, you can use Each subsequent page will have its own |
previousPageToken |
string Token for getting the previous page of the log entries. After getting log entries initially with Criteria, you can use Each subsequent page will have its own |
LogEntry
Field |
Description |
uid |
string Unique entry ID. Useful for logs deduplication. |
resource |
Entry resource specification. May contain information about source service and resource ID. |
timestamp |
Timestamp of the entry. |
ingestedAt |
Entry ingestion time observed by LogIngestionService. |
savedAt |
Entry save time. Entry is ready to be read since this moment. |
level |
enum Level Entry severity. See LogLevel.Level for details.
|
message |
string Entry text message. |
jsonPayload |
Entry annotation. |
streamName |
string Entry stream name. |
LogEntryResource
Log entry resource specification.
May be used either by services and by user.
Field |
Description |
type |
string Resource type, i.e., |
id |
string Resource ID, i.e., ID of the function producing logs. |