[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-11。"],[],[],null,["# Cloud Workstations container output logging\n\nThis page describes Cloud Workstations container output logs generated by\nindividual workstations.\n\nOverview\n--------\n\nStandard container output logs and standard container error logs generated by\nthe workstation container are sent to\n[Cloud Logging](/logging/docs/overview)\nfor monitoring and debugging.\n\nTo view container output logs for a particular workstation:\n\n1. Ensure that your configuration specifies a service account that has the\n [Logs Writer](/logging/docs/access-control#logging.logWriter) role\n (`roles/logging.logWriter`) and [Monitoring Metric\n Writer](/monitoring/access-control#predefined_roles)\n (`roles/monitoring.metricWriter`) on your project.\n\n | **Caution:** If you do not specify a service account on your configuration, the workstation uses a default service account. However, this default service account *cannot* be used for collecting container output logs.\n2. Start a workstation.\n\n3. To view container logs for this workstation, navigate to the\n Logs Explorer and update the query to the following:\n\n resource.type=\"gce_instance\" labels.workstation_id=\u003cvar translate=\"no\"\u003eWORKSTATION_ID\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eWORKSTATION_ID\u003c/var\u003e with the name of the workstation\n that you want to look up.\n\n You can also filter by `labels.workstation_cluster_id` or\n `labels.workstation_config_id` as needed.\n\n| **Note:** Errors in the container output logs won't necessarily be logged at severity `ERROR`. Don't add a severity filter while looking for errors in the container output logs.\n| **Note:** If your workstation is failing to start during VM creation, there may be an issue with your VPC or project configuration, and container output logs may help identify this. However, in this case the VM won't be assigned to a workstation, so you will need to instead filter by cluster and config ID.\n\nWhat's next\n-----------\n\n- Learn more about the [Cloud Workstations logging API](/logging/docs/api/platform-logs#workstations)\n\n- Understand and manage [Google Cloud platform logs](/logging/docs/api/platform-logs#managing-logs)\n\n- Learn more about [Cloud Workstations audit logging](/workstations/docs/audit-logging)"]]