- NAME
-
- gcloud beta run jobs logs read - read logs for Cloud Run jobs
- SYNOPSIS
-
-
gcloud beta run jobs logs read
JOB
[--freshness
=FRESHNESS
; default="1d"] [--log-filter
=LOG_FILTER
] [--order
=ORDER
; default="desc"] [--region
=REGION
] [--limit
=LIMIT
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
(BETA)
gcloud beta run jobs logs read reads log entries. Log entries matching--log-filter
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. - EXAMPLES
-
To read log entries from for a Cloud Run job, run:
gcloud beta run jobs logs read my-job
To read log entries with severity ERROR or higher, run:
gcloud beta run jobs logs read my-job --log-filter="severity>=ERROR"
To read log entries written in a specific time window, run:
gcloud beta run jobs logs read my-job --log-filter='timestamp<="2015-05-31T23:59:59Z" AND
timestamp>="2015-05-31T00:00:00Z"'To read up to 10 log entries in your job payloads that include the word
SearchText
and format the output inJSON
format, run:gcloud beta run jobs logs read my-job --log-filter="textPayload:SearchText" --limit=10 --format=json
Detailed information about filters can be found at: https://cloud.google.com/logging/docs/view/advanced_filters
- POSITIONAL ARGUMENTS
-
JOB
- Name for a Cloud Run job.
- FLAGS
-
--freshness
=FRESHNESS
; 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.
--log-filter
=LOG_FILTER
- 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
--order
=ORDER
; default="desc"-
Ordering of returned log entries based on timestamp field.
ORDER
must be one of:desc
,asc
. --region
=REGION
- Region in which the resource can be found. Alternatively, set the property [run/region].
- LIST COMMAND FLAGS
-
--limit
=LIMIT
-
Maximum number of resources to list. The default is
unlimited
. This flag interacts with other flags that are applied in this order:--flatten
,--sort-by
,--filter
,--limit
.
- 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
$ gcloud help
for details. - NOTES
-
This command is currently in beta and might change without notice. These
variants are also available:
gcloud run jobs logs read
gcloud alpha run jobs logs read
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-10 UTC.