Method: entries.tail Stay organized with collections Save and categorize content based on your preferences.
Streaming read of log entries as they are received. Until the stream is terminated, it will continue reading logs.
HTTP request
POST https://logging.googleapis.com/v2/entries:tail
The URL usesgRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{"resourceNames":[string],"filter":string,"bufferWindow":string} |
| Fields | |
|---|---|
resourceNames[] |
Required. Name of a parent resource from which to retrieve log entries:
May alternatively be one or more views:
Authorization requires one or more of the followingIAM permissions on the specified resource
|
filter |
Optional. A filter that chooses which log entries to return. For more information, seeLogging query language. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in |
bufferWindow |
Optional. The amount of time to buffer log entries at the server before being returned to prevent out of order results due to late arriving log entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 milliseconds. A duration in seconds with up to nine fractional digits, ending with ' |
Response body
Result returned fromentries.tail.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{"entries":[{object ( |
| Fields | |
|---|---|
entries[] |
A list of log entries. Each response in the stream will order entries with increasing values of |
suppressionInfo[] |
If entries that otherwise would have been included in the session were not sent back to the client, counts of relevant entries omitted from the session with the reason that they were not included. There will be at most one of each reason per response. The counts represent the number of suppressed entries since the last streamed response. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/logging.readhttps://www.googleapis.com/auth/logging.adminhttps://www.googleapis.com/auth/cloud-platform.read-onlyhttps://www.googleapis.com/auth/cloud-platform
For more information, see theAuthentication Overview.
SuppressionInfo
Information about entries that were omitted from the session.
| JSON representation |
|---|
{"reason":enum ( |
| Fields | |
|---|---|
reason |
The reason that entries were omitted from the session. |
suppressedCount |
A lower bound on the count of entries omitted due to |
Reason
An indicator of why entries were omitted.
| Enums | |
|---|---|
REASON_UNSPECIFIED | Unexpected default. |
RATE_LIMIT | Indicates suppression occurred due to relevant entries being received in excess of rate limits. For quotas and limits, seeLogging API quotas and limits. |
NOT_CONSUMED | Indicates suppression occurred due to the client not consuming responses quickly enough. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-04 UTC.