[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eCloud Audit Logs track administrative activities and permissions within Google Cloud resources, and upon enabling them, the logging explorer will record both the AuditLog proto and API-level logs.\u003c/p\u003e\n"],["\u003cp\u003eTo enable logging, you must go to the Google Cloud console, navigate to \u003cstrong\u003eIAM & Admin\u003c/strong\u003e > \u003cstrong\u003eAudit Logs\u003c/strong\u003e, and filter for \u003ccode\u003eDialogflow API\u003c/code\u003e, selecting \u003cstrong\u003eAdmin read\u003c/strong\u003e, \u003cstrong\u003eData read\u003c/strong\u003e, and \u003cstrong\u003eData write\u003c/strong\u003e API types.\u003c/p\u003e\n"],["\u003cp\u003eViewing logs requires the \u003cem\u003eproject owner\u003c/em\u003e and \u003cem\u003eprivate logs viewer\u003c/em\u003e IAM roles, after which you can navigate to \u003cstrong\u003eLogging\u003c/strong\u003e > \u003cstrong\u003eLogs Explorer\u003c/strong\u003e in the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eEach log entry is an instance of the \u003ccode\u003eAuditLog proto\u003c/code\u003e, containing detailed fields like \u003ccode\u003eservice_name\u003c/code\u003e, \u003ccode\u003emethod_name\u003c/code\u003e, \u003ccode\u003erequest\u003c/code\u003e, and \u003ccode\u003eresponse\u003c/code\u003e, along with authentication and authorization information.\u003c/p\u003e\n"],["\u003cp\u003eAPI-level logs capture specific request and response fields, such as \u003ccode\u003eparticipant\u003c/code\u003e in \u003ccode\u003eAnalyzeContent\u003c/code\u003e requests and \u003ccode\u003espeech_model\u003c/code\u003e in \u003ccode\u003eStreamingAnalyzeContent\u003c/code\u003e responses.\u003c/p\u003e\n"]]],[],null,["# Cloud Logging field definitions\n\nAfter you enable Cloud Audit Logs, the Google Cloud console logging explorer records the contents of the following categories:\n\n- AuditLog proto\n- API-level log\n\nEnable and view\n---------------\n\nCloud Audit Logs allow you to view administrative activities and permissions within Google Cloud resources.\n\n### Enable logging\n\nFollow these steps to enable the logs.\n\n1. Navigate to the Google Cloud console, select **IAM \\& Admin** \\\u003e **Audit Logs**.\n2. Enter the `Dialogflow API` filter for **Data access audit logs configuration** , and select the following API types: **Admin read** , **Data read** , and **Data write**.\n\n| **Note:** To enable logging for either all or no methods in a category, you configure logging by data access type, not individual method.\n\n### View logs\n\nYou must acquire the *project owner* and *private logs viewer* [IAM roles](/iam/docs/roles-overview), then follow these steps to view the logs.\n\n1. Navigate to the Google Cloud console, then select **Logging** \\\u003e **Logs Explorer**.\n2. Optional: In Logs Explorer, add a filter or adjust the timeline as preferred.\n3. Select an entry to view details.\n\n| **Note:** Many fields in the request or response body are logged, but not all. Engineering annotates the RPC definition to indicate the fields to expose for logging. For example, the `protoPayload` filter exposes the JSON object with the audit log entry.\n\nThe logging proto\n-----------------\n\nEach log entry will be an instance of the `AuditLog proto`, which contains the following fields:\n\nDepending on the enabled Cloud Audit Logs fields, the log explorer populates the API's request and response bodies into the request and response fields of the logging proto.\n\nAPI-level logged fields\n-----------------------"]]