Cloud Logging Service, gRPC: LogIngestionService
Written by
Updated at August 30, 2023
A set of methods for writing to log groups.
Call | Description |
---|---|
Write | Write log entries to specified destination. |
Calls LogIngestionService
Write
Write log entries to specified destination.
rpc Write (WriteRequest) returns (WriteResponse)
WriteRequest
Field | Description |
---|---|
destination | Destination Required. Log entries destination. See Destination for details. |
resource | LogEntryResource Common resource (type, ID) specification for log entries. |
entries[] | IncomingLogEntry List of log entries. The number of elements must be in the range 1-100. |
defaults | LogEntryDefaults Log entries defaults. See LogEntryDefaults for details. |
Destination
Field | Description |
---|---|
destination | oneof: log_group_id or folder_id Entry destination. |
log_group_id | string Entry should be written to log group resolved by ID. Value must match the regular expression ([a-zA-Z][-a-zA-Z0-9_.]{0,63})? . |
folder_id | string Entry should be written to default log group for the folder. Value must match the regular expression ([a-zA-Z][-a-zA-Z0-9_.]{0,63})? . |
LogEntryResource
Field | Description |
---|---|
type | string Resource type, i.e., serverless.function The maximum string length in characters is 63. |
id | string Resource ID, i.e., ID of the function producing logs. The maximum string length in characters is 63. |
IncomingLogEntry
Field | Description |
---|---|
timestamp | google.protobuf.Timestamp Required. Timestamp of the entry. |
level | LogLevel.Level Entry severity. See LogLevel.Level for details. |
message | string Entry text message. |
json_payload | google.protobuf.Struct Entry annotation. |
stream_name | string Entry stream name. The maximum string length in characters is 63. |
LogEntryDefaults
Field | Description |
---|---|
level | LogLevel.Level Default entry severity. Will be applied if entry level is unspecified. See LogLevel.Level for details. |
json_payload | google.protobuf.Struct Default entry annotation. Will be merged with entry annotation. Any conflict will be resolved in favor of entry own annotation. |
stream_name | string Entry stream name. The maximum string length in characters is 63. |
WriteResponse
Field | Description |
---|---|
errors | map<int64,google.rpc.Status> Map<idx, status> of ingest failures. If entry with idx N is absent, it was ingested successfully. |