File: //snap/google-cloud-cli/current/help/man/man1/gcloud_beta_run_jobs_logs_read.1
.TH "GCLOUD_BETA_RUN_JOBS_LOGS_READ" 1
.SH "NAME"
.HP
gcloud beta run jobs logs read \- read logs for Cloud Run jobs
.SH "SYNOPSIS"
.HP
\f5gcloud beta run jobs logs read\fR \fIJOB\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"
\fB(BETA)\fR gcloud beta run jobs 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 job, run:
.RS 2m
$ gcloud beta run jobs logs read my\-job
.RE
To read log entries with severity ERROR or higher, run:
.RS 2m
$ gcloud beta run jobs logs read my\-job \e
\-\-log\-filter="severity>=ERROR"
.RE
To read log entries written in a specific time window, run:
.RS 2m
$ gcloud beta run jobs logs read my\-job \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 job payloads that include the word
\f5SearchText\fR and format the output in \f5JSON\fR format, run:
.RS 2m
$ gcloud beta run jobs logs read my\-job \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
\fIJOB\fR
Name for a Cloud Run job.
.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"
This command is currently in beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud run jobs logs read
.RE
.RS 2m
$ gcloud alpha run jobs logs read
.RE