View Cloud Run logs in Cloud Code for Cloud Shell

The Cloud Code Log Viewer provides tools for searching and filtering logs.

To view logs from a Cloud Run service, follow these steps:

  1. To open the Log Viewer, open the Command Palette (press Ctrl/Cmd+Shift+P or click Manage icon Manage > Command Palette) and then type Cloud Code: View Logs.
  2. Select Cloud Run Logs from the Log Type list.
  3. Select a Cloud Run service from the Service list.
  4. To view the logs from a particular revision, select a revision using the Revision list.
  5. To refine your search results, click Search Logs and then type search terms. This search includes the namespace, deployment, pod, container, and time. For clusters with Cloud Logging enabled, you can also filter by severity level.

Viewing logs for a specific resource

To view the logs for a specific resource, follow these steps:

1. Open the Cloud Run Explorer by clicking Cloud Run explorer icon Cloud Code - Cloud Run.

  1. In the Cloud Run Explorer, right-click a resource and then select View logs.

Viewing streaming logs

To have the Log Viewer display updated logs as the logs are generated, in the Log Viewer, turn the Streaming slider on.