Stay organized with collections
Save and categorize content based on your preferences.
This page describes how to turn on Chat app error logging, so that you can query and view error logs in Google Cloud Logs Explorer while testing your Chat app.
Prerequisites
To turn on Chat app error logging, you need:
A Google Workspace account with access to Google Chat.
A Chat app. To build a Chat app, follow this quickstart.
Set up the environment
Before querying Chat app error logs, you must enable the Cloud Logging API in the Chat app's Google Cloud project.
In the Google Cloud console, turn on the Cloud Logging API. Click Menumenu>APIs & Services>Library.
> search for Cloud Logging API> click Cloud Logging API>Enable.
Turn on error logging and when a Chat app returns an error, it logs it to Cloud logging. Because Cloud Logging incurs a cost, you might want to turn off error logging after you finish troubleshooting.
In the Google Cloud console, go to the Chat API configuration page. Click Menumenu>More products>Google Workspace>Product Library>Google Chat API>Manage>Configuration.
Under Functionality, select Log errors to Cloud Logging.
Click Save.
Now, whenever the Chat app returns an error, the error gets logged to Cloud Logging.
Turn off error logging
Because Cloud Logging incurs a cost, you might want to turn off error logging.
In the Google Cloud console, go to the Chat API configuration page. Click Menumenu>More products>Google Workspace>Product Library>Google Chat API>Manage>Configuration.
Under Functionality, deselect Log errors to Cloud Logging.
Click Save.
Now, whenever the Chat app returns an error, the error doesn't get logged to Cloud Logging. You can continue to query past error logs using Logs Explorer.
Related topics
After turning on error logging, you're ready to query error logs for your Chat app.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-13 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"]]