View Cloud Run logs in Cloud Code for VS Code
The Cloud Code Log Viewer provides tools for searching and
filtering logs.
To view logs from a Cloud Run service, follow these steps:
- To open the Log Viewer, open the command palette (press
Ctrl
/Cmd
+Shift
+P
or click View > Command Palette) and then
run Cloud Code: View Logs.
- Select Cloud Run Logs from the Log Type list.
- Select a Cloud Run service from the Service list.
- To view the logs from a particular revision, select a revision using the
Revision list.
- 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:
- Click
Cloud Code and then expand the Cloud Run
explorer.
- Right-click a resource and then click 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.
Get Support
To send feedback, report issues on
GitHub,
or ask a question on
Stack Overflow.
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 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["The Cloud Code Log Viewer allows users to search and filter logs for specific information."],["Logs from a Cloud Run service can be accessed through the command palette by selecting 'Cloud Code: View Logs' and then specifying the Cloud Run service and revision."],["Users can refine their log searches by using the 'Search Logs' function and entering specific terms, including namespace, deployment, pod, container, and time."],["Logs for a specific resource can be accessed directly by right-clicking the resource within the Cloud Run explorer and selecting 'View logs'."],["The Log Viewer can display updated logs in real-time when the 'Streaming' slider is turned on."]]],[]]