本页面上的部分或全部信息可能不适用于 Trusted Cloud by S3NS。
在 Cloud Code for VS Code 中查看 Cloud Run 日志
Cloud Code 日志查看器提供了用于搜索和过滤日志的工具。
如需查看 Cloud Run 服务的日志,请按照以下步骤操作:
- 如需打开日志查看器,请打开 Command Palette(按
Ctrl
/Cmd
+Shift
+P
或点击 View > Command Palette),然后运行 Cloud Code: View Logs。
- 从日志类型列表中选择 Cloud Run 日志 (Cloud Run Logs)。
- 从服务列表中选择一项 Cloud Run 服务。
- 如需查看特定修订版本的日志,请使用修订版本列表选择相应修订版本。
- 如需优化搜索结果,请点击搜索日志,然后输入搜索字词。此搜索包括命名空间、部署、Pod、容器和时间。如果集群启用了 Cloud Logging,您还可以按严重级别进行过滤。
查看针对特定资源的日志
如需查看特定资源的日志,请按照以下步骤操作:
- 点击
Cloud Code,然后展开 Cloud Run 探索器。
- 右键点击相应资源,然后点击查看日志。
查看流式传输日志
如需让日志查看器在生成日志时显示更新后的日志,请在日志查看器中开启流式传输滑块。
获取支持
如需发送反馈,请在
GitHub 上报告问题,或者在
Stack Overflow 上提问。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-11。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-11。"],[[["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."]]],[]]