File: //snap/google-cloud-cli/current/help/man/man1/gcloud_alpha_logging_tail.1
.TH "GCLOUD_ALPHA_LOGGING_TAIL" 1
.SH "NAME"
.HP
gcloud alpha logging tail \- tail log entries
.SH "SYNOPSIS"
.HP
\f5gcloud alpha logging tail\fR [\fILOG_FILTER\fR] [\fB\-\-buffer\-window\fR=\fIBUFFER_WINDOW\fR] [\fB\-\-billing\-account\fR=\fIBILLING_ACCOUNT_ID\fR\ |\ \fB\-\-folder\fR=\fIFOLDER_ID\fR\ |\ \fB\-\-organization\fR=\fIORGANIZATION_ID\fR\ |\ \fB\-\-project\fR=\fIPROJECT_ID\fR] [\fB\-\-bucket\fR=\fIBUCKET\fR\ \fB\-\-location\fR=\fILOCATION\fR\ \fB\-\-view\fR=\fIVIEW\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(ALPHA)\fR gcloud alpha logging tail streams newly received log entries. Log
entries matching \f5log\-filter\fR are returned in the order that Cloud Logging
received them. If the log entries come from multiple logs, then entries from
different logs might be mixed in the results. To help return log entries in
order, use \f5\-\-buffer\-window\fR.
Before you can use gcloud alpha logging tail, you must complete the installation
instructions at Live tailing log entries
(https://cloud.google.com/logging/docs/reference/tools/gcloud\-logging#live\-tailing).
For the quotas and limits associated with gcloud alpha logging tail, see Logging
API quotas and limits (https://cloud.google.com/logging/quotas#api\-limits).
.SH "EXAMPLES"
To stream log entries from Google Compute Engine instances, run:
.RS 2m
$ gcloud alpha logging tail "resource.type=gce_instance"
.RE
To stream log entries with severity ERROR or higher, run:
.RS 2m
$ gcloud alpha logging tail "severity>=ERROR"
.RE
To stream log entries with severity ERROR but only output the timestamps and
instance IDs, run:
.RS 2m
$ gcloud alpha logging tail "severity>=ERROR" \e
\-\-format="default(timestamp,resource["labels"]["instance_id"])"
.RE
To stream with minimal latency but potentially incorrect ordering:
.RS 2m
$ gcloud alpha logging tail "resource.type=gce_instance" \e
\-\-buffer\-window=0s
.RE
To stream log entries in your project's syslog log from Compute Engine instances
containing payloads that include the word \f5SyncAddress\fR and format the
output in \f5JSON\fR format, run:
.RS 2m
$ gcloud alpha logging tail \e
"resource.type=gce_instance AND log_id(syslog) AND \e
textPayload:SyncAddress" \-\-format=json
.RE
To stream log entries from a folder, run:
.RS 2m
$ gcloud alpha logging tail "resource.type=global" \e
\-\-folder=[FOLDER_ID]
.RE
Detailed information about filters can be found at:
https://cloud.google.com/logging/docs/view/logging\-query\-language
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
[\fILOG_FILTER\fR]
Filter expression that specifies the log entries to return. A detailed guide on
the Logging query language can be found at:
https://cloud.google.com/logging/docs/view/logging\-query\-language.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-buffer\-window\fR=\fIBUFFER_WINDOW\fR
The duration of time for which entries should be buffered for ordering before
being returned. A longer buffer window helps to return logs in chronological
order, but it also increases the latency from when entries are received by Cloud
Logging to when they are returned. If unset, Cloud Logging will use 2s by
default.
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-billing\-account\fR=\fIBILLING_ACCOUNT_ID\fR
Billing account of the log entries to tail.
.TP 2m
\fB\-\-folder\fR=\fIFOLDER_ID\fR
Folder of the log entries to tail.
.TP 2m
\fB\-\-organization\fR=\fIORGANIZATION_ID\fR
Organization of the log entries to tail.
.TP 2m
\fB\-\-project\fR=\fIPROJECT_ID\fR
Project of the log entries to tail.
The Google Cloud project ID to use for this invocation. If omitted, then the
current project is assumed; the current project can be listed using \f5gcloud
config list \-\-format='text(core.project)'\fR and can be set using \f5gcloud
config set project PROJECTID\fR.
\f5\-\-project\fR and its fallback \f5core/project\fR property play two roles in
the invocation. It specifies the project of the resource to operate on. It also
specifies the project for API enablement check, quota, and billing. To specify a
different project for quota and billing, use \f5\-\-billing\-project\fR or
\f5billing/quota_project\fR property.
.RE
.sp
.TP 2m
These arguments are used in conjunction with the parent to construct a view
resource.
.RS 2m
.TP 2m
\fB\-\-bucket\fR=\fIBUCKET\fR
Id of the bucket. If this argument is provided, then \f5\-\-location\fR and
\f5\-\-view\fR must also be specified.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-location\fR=\fILOCATION\fR
Location of the bucket. If this argument is provided, then \f5\-\-bucket\fR and
\f5\-\-view\fR must also be specified.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-view\fR=\fIVIEW\fR
Id of the view. If this argument is provided, then \f5\-\-location\fR and
\f5\-\-bucket\fR must also be specified.
This flag argument must be specified if any of the other arguments in this group
are specified.
.RE
.RE
.sp
.SH "GCLOUD WIDE FLAGS"
These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.
Run \fB$ gcloud help\fR for details.
.SH "NOTES"
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. This variant is also available:
.RS 2m
$ gcloud beta logging tail
.RE