[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2024-12-05 (UTC)."],[],[],null,["# View logs\n=========\n\nRecommender logs record changes to recommendation and insight state.\n\nPermissions\n-----------\n\nIdentity and Access Management permissions and roles determine which logs you can view and export.\n\nTo view Recommender logs, you must have one of the\nfollowing IAM roles in the project that contains your logs:\n\n- One of the basic roles: **Project Owner** , **Project Editor** , or **Project Viewer**.\n- The Cloud Logging [**Logs Viewer**](/logging/docs/access-control#permissions_and_roles) role.\n- A [custom IAM role](/iam/docs/creating-custom-roles) with the `logging.logEntries.list` IAM permission.\n\nViewing logs\n------------\n\n### Recommendation Logs\n\nTo view recommendation action logs:\n\n1. Go to the **Google Cloud Observability Logging \\\u003e Logs** (Logs Explorer) page in\n the Google Cloud console:\n\n [Go to the Logs Explorer page](https://console.cloud.google.com/logs/query)\n2. Select an existing Google Cloud project at the top of the page or\n create a new project.\n\n3. In the first drop-down menu, select **Recommender**.\n\n4. Expand a log entry to view the entry details. The following example shows\n a claimed recommendation.\n\n {\n insertId: \"t51fxaa1\"\n jsonPayload: {\n @type: \"type.googleapis.com/google.cloud.recommender.logging.v1.ActionLog\"\n actor: \"user@gmail.com\"\n recommendationName: \"projects/my-recommender-project/locations/global/recommenders/google.iam.policy.Recommender/recommendations/r1\"\n state: \"CLAIMED\"\n stateMetadata: {\n my_metadata: \"Some metadata.\"\n }\n }\n logName: \"projects/my-recommender-project/logs/recommender.googleapis.com%2Factions\"\n receiveTimestamp: \"2019-07-01T21:55:06.950795284Z\"\n resource: {\n labels: {\n location: \"global\"\n project_id: \"my-recommender-project\"\n recommender_id: \"google.iam.policy.Recommender\"\n }\n type: \"recommender\"\n }\n severity: \"INFO\"\n timestamp: \"2019-07-01T21:55:06.529Z\"\n }\n\n### Insight Logs\n\nTo view insight action logs:\n\n1. Go to the **Google Cloud Observability Logging \\\u003e Logs** (Logs Explorer) page in\n the Google Cloud console:\n\n [Go to the Logs Explorer page](https://console.cloud.google.com/logs/query)\n2. Select an existing Google Cloud project at the top of the page or\n create a new project.\n\n3. In the first drop-down menu, select **InsightType**.\n\n4. Expand a log entry to view the entry details. The following example shows\n an accepted insight.\n\n {\n insertId: \"t51fxaa1\"\n jsonPayload: {\n @type: \"type.googleapis.com/google.cloud.recommender.logging.v1.InsightActionLog\"\n actor: \"user@gmail.com\"\n insight: \"projects/my-recommender-project/locations/global/insightTypes/google.iam.policy.Insight/insights/i1\"\n state: \"ACCEPTED\"\n stateMetadata: {\n my_metadata: \"Some metadata.\"\n }\n }\n logName: \"projects/my-recommender-project/logs/recommender.googleapis.com%2Factions\"\n receiveTimestamp: \"2019-07-01T21:55:06.950795284Z\"\n resource: {\n labels: {\n location: \"global\"\n project_id: \"my-recommender-project\"\n insight_type_id: \"google.iam.policy.Recommender\"\n }\n type: \"recommender_insight_type\"\n }\n severity: \"INFO\"\n timestamp: \"2019-07-01T21:55:06.529Z\"\n }"]]