הפעלת שגיאות ברישום ביומן באפליקציות של Google Chat
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
בדף הזה מוסבר איך מפעילים את הרישום ביומן של שגיאות באפליקציית Chat, כדי שתוכלו להריץ שאילתות ולראות יומני שגיאות ב-Google Cloud Logs Explorer בזמן בדיקת אפליקציית Chat.
דרישות מוקדמות
כדי להפעיל את הרישום ביומן של שגיאות באפליקציית Chat, צריך:
חשבון Google Workspace עם גישה ל-Google Chat.
אפליקציית Chat. כדי ליצור אפליקציית Chat, פועלים לפי המדריך למתחילים.
הגדרת הסביבה
לפני ששולחים שאילתה לגבי יומני השגיאות של אפליקציית Chat, צריך להפעיל את Cloud Logging API בפרויקט Google Cloud של אפליקציית Chat.
במסוף Google Cloud, מפעילים את Cloud Logging API. לוחצים על תפריטmenu>ממשקי API ושירותים>ספרייה.
> מחפשים את Cloud Logging API> לוחצים על Cloud Logging API>Enable (הפעלה).
בקטע Functionality (פונקציונליות), מבטלים את הבחירה באפשרות Log errors to Cloud Logging (תיעוד שגיאות ביומן Cloud Logging).
לוחצים על שמירה.
מעכשיו, בכל פעם שאפליקציית Chat מחזירה שגיאה, היא לא מתועדת ביומן של Cloud Logging. אפשר להמשיך לשלוח שאילתות ליומני שגיאות קודמים באמצעות Logs Explorer.
[[["התוכן קל להבנה","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"]],["עדכון אחרון: 2025-02-16 (שעון UTC)."],[[["This guide explains how to enable error logging for your Google Chat app, allowing you to view and analyze errors in Google Cloud Logs Explorer."],["To enable error logging, you need a Google Workspace account, a Chat app, and the Cloud Logging API enabled in your Google Cloud project."],["When enabled, Chat app errors are logged to Cloud Logging, which may incur costs; you can disable logging after troubleshooting."],["You can turn off error logging to avoid incurring costs from Cloud Logging, but you can still query past logs."]]],["To enable Chat app error logging, first enable the Cloud Logging API in the Google Cloud console. Then, navigate to the Chat API configuration page and under Functionality, select \"Log errors to Cloud Logging,\" and save. Errors are now logged to Cloud Logging. To disable, deselect \"Log errors to Cloud Logging\" and save. Remember to disable it when troubleshooting is complete, as Cloud Logging incurs a cost. Error logs can be viewed in Google Cloud Logs Explorer.\n"]]