File: //snap/google-cloud-cli/396/help/man/man1/gcloud_run_services_logs_read.1
.TH "GCLOUD_RUN_SERVICES_LOGS_READ" 1
.SH "NAME"
.HP
gcloud run services logs read \- read logs for a Cloud Run service
.SH "SYNOPSIS"
.HP
\f5gcloud run services logs read\fR \fISERVICE\fR [\fB\-\-freshness\fR=\fIFRESHNESS\fR;\ default="1d"] [\fB\-\-log\-filter\fR=\fILOG_FILTER\fR] [\fB\-\-order\fR=\fIORDER\fR;\ default="desc"] [\fB\-\-region\fR=\fIREGION\fR] [\fB\-\-limit\fR=\fILIMIT\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
gcloud run services logs read reads log entries. Log entries matching
\fB\-\-log\-filter\fR are returned according to the specified \-\-order. If the
log entries come from multiple logs, then entries from different logs might be
intermingled in the results.
.SH "EXAMPLES"
To read log entries from for a Cloud Run Service, run:
.RS 2m
$ gcloud run services logs read my\-service
.RE
To read log entries with severity ERROR or higher, run:
.RS 2m
$ gcloud run services logs read my\-service \e
\-\-log\-filter="severity>=ERROR"
.RE
To read log entries written in a specific time window, run:
.RS 2m
$ gcloud run services logs read my\-service \e
\-\-log\-filter='timestamp<="2015\-05\-31T23:59:59Z" AND
timestamp>="2015\-05\-31T00:00:00Z"'
.RE
To read up to 10 log entries in your service payloads that include the word
\f5SearchText\fR and format the output in \f5JSON\fR format, run:
.RS 2m
$ gcloud run services logs read my\-service \e
\-\-log\-filter="textPayload:SearchText" \-\-limit=10 \-\-format=json
.RE
Detailed information about filters can be found at:
https://cloud.google.com/logging/docs/view/advanced_filters
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fISERVICE\fR
Name for a Cloud Run service.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-freshness\fR=\fIFRESHNESS\fR; default="1d"
Return entries that are not older than this value. Works only with DESC ordering
and filters without a timestamp. See $ gcloud topic datetimes for information on
duration formats.
.TP 2m
\fB\-\-log\-filter\fR=\fILOG_FILTER\fR
Filter expression that specifies the log entries to return. Detailed information
about filters can be found at:
https://cloud.google.com/logging/docs/view/logging\-query\-language
.TP 2m
\fB\-\-order\fR=\fIORDER\fR; default="desc"
Ordering of returned log entries based on timestamp field. \fIORDER\fR must be
one of: \fBdesc\fR, \fBasc\fR.
.TP 2m
\fB\-\-region\fR=\fIREGION\fR
Region in which the resource can be found. Alternatively, set the property
[run/region].
.RE
.sp
.SH "LIST COMMAND FLAGS"
.RS 2m
.TP 2m
\fB\-\-limit\fR=\fILIMIT\fR
Maximum number of resources to list. The default is \fBunlimited\fR. This flag
interacts with other flags that are applied in this order: \fB\-\-flatten\fR,
\fB\-\-sort\-by\fR, \fB\-\-filter\fR, \fB\-\-limit\fR.
.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"
These variants are also available:
.RS 2m
$ gcloud alpha run services logs read
.RE
.RS 2m
$ gcloud beta run services logs read
.RE