gcloud alpha run revisions logs read Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha run revisions logs read - read logs for a Cloud Run revision
- SYNOPSIS
gcloud alpha run revisions logs readREVISION[--freshness=FRESHNESS; default="1d"][--log-filter=LOG_FILTER][--order=ORDER; default="desc"][--region=REGION][--limit=LIMIT][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)gcloud alpha run revisions logs read reads log entries. Logentries matching--log-filterare returned in order of decreasingtimestamps, most-recent entries first. If the log entries come from multiplelogs, then entries from different logs might be intermingled in the results.- EXAMPLES
- To read log entries from for a Cloud Run revision, run:
gcloudalpharunrevisionslogsreadmy-revisionTo read log entries with severity ERROR or higher, run:
gcloudalpharunrevisionslogsreadmy-revision--log-filter="severity>=ERROR"To read log entries written in a specific time window, run:
gcloudalpharunrevisionslogsreadmy-revision--log-filter='timestamp<="2015-05-31T23:59:59Z" ANDtimestamp>="2015-05-31T00:00:00Z"'To read up to 10 log entries in your revision payloads that include the word
SearchTextand format the output inJSONformat, run:gcloudalpharunrevisionslogsreadmy-revision--log-filter="textPayload:SearchText"--limit=10--format=jsonDetailed information about filters can be found at:https://cloud.google.com/logging/docs/view/advanced_filters
- POSITIONAL ARGUMENTS
REVISION- Name for a Cloud Run revision.
- FLAGS
--freshness=FRESHNESS; default="1d"- Return entries that are not older than this value. Works only with DESC orderingand filters without a timestamp. See $gcloud topic datetimes forinformation on duration formats.
--log-filter=LOG_FILTER- Filter expression that specifies the log entries to return. Detailed informationabout 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.
ORDERmust 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. Thisflag 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 helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. This variant is also available:
gcloudbetarunrevisionslogsread
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-05-07 UTC.