Google Chat 앱의 오류 로깅 사용 설정하기
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 페이지에서는 Chat 앱을 테스트하는 동안 Google Cloud 로그 탐색기에서 오류 로그를 쿼리하고 볼 수 있도록 Chat 앱 오류 로깅을 사용 설정하는 방법을 설명합니다.
기본 요건
Chat 앱 오류 로깅을 사용 설정하려면 다음이 필요합니다.
- Google Chat에 액세스할 수 있는 Google Workspace 계정
- Chat 앱. Chat 앱을 빌드하려면 이 빠른 시작을 따르세요.
환경 설정
Chat 앱 오류 로그를 쿼리하려면 먼저 Chat 앱의 Google Cloud 프로젝트에서 Cloud Logging API를 사용 설정해야 합니다.
Google Cloud 콘솔에서 Cloud Logging API를 사용 설정합니다. 메뉴
menu
> API 및 서비스
> 라이브러리를 클릭합니다.
> Cloud Logging API를 검색하고
> Cloud Logging API를 클릭한 다음
> 사용 설정을 클릭합니다.
API 사용 설정
오류 로깅 사용 설정
오류 로깅을 사용 설정하면 Chat 앱에서 오류를 반환할 때 Cloud Logging에 로깅됩니다. Cloud Logging은 비용이 발생하므로 문제 해결을 완료한 후 오류 로깅을 사용 중지하는 것이 좋습니다.
Google Cloud 콘솔에서 Chat API 구성 페이지로 이동합니다. 메뉴
menu
> 기타 제품
> Google Workspace
> 제품 라이브러리
> Google Chat API
> 관리
> 구성을 클릭합니다.
Chat API로 이동
기능에서 Cloud Logging에 오류 로깅을 선택합니다.
저장을 클릭합니다.
이제 Chat 앱이 오류를 반환할 때마다 오류가 Cloud Logging에 로깅됩니다.
오류 로깅 사용 중지
Cloud Logging은 비용이 발생하므로 오류 로깅을 사용 중지하는 것이 좋습니다.
Google Cloud 콘솔에서 Chat API 구성 페이지로 이동합니다. 메뉴
menu
> 기타 제품
> Google Workspace
> 제품 라이브러리
> Google Chat API
> 관리
> 구성을 클릭합니다.
Chat API로 이동
기능에서 Cloud Logging에 오류 로깅을 선택 해제합니다.
저장을 클릭합니다.
이제 Chat 앱이 오류를 반환해도 오류가 Cloud Logging에 로깅되지 않습니다. 로그 탐색기를 사용하여 이전 오류 로그를 계속 쿼리할 수 있습니다.
오류 로깅을 사용 설정한 후 Chat 앱의 오류 로그를 쿼리할 수 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-04(UTC)
[null,null,["최종 업데이트: 2025-08-04(UTC)"],[[["\u003cp\u003eThis guide explains how to enable error logging for your Google Chat app, allowing you to view and analyze errors in Google Cloud Logs Explorer.\u003c/p\u003e\n"],["\u003cp\u003eTo enable error logging, you need a Google Workspace account, a Chat app, and the Cloud Logging API enabled in your Google Cloud project.\u003c/p\u003e\n"],["\u003cp\u003eWhen enabled, Chat app errors are logged to Cloud Logging, which may incur costs; you can disable logging after troubleshooting.\u003c/p\u003e\n"],["\u003cp\u003eYou can turn off error logging to avoid incurring costs from Cloud Logging, but you can still query past logs.\u003c/p\u003e\n"]]],["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"],null,["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](https://cloud.google.com/logging/docs/view/logs-viewer-interface) while testing your Chat app.\n\nPrerequisites\n\nTo turn on Chat app error logging, you need:\n\n- A Google Workspace account with access to Google Chat.\n- A Chat app. To build a Chat app, follow this [quickstart](/workspace/chat/quickstart/gcf-app).\n\nSet up the environment\n\nBefore querying Chat app error logs, you must enable the Cloud Logging API in the Chat app's Google Cloud project.\n\n1. In the Google Cloud console, turn on the Cloud Logging API. Click **Menu**\n menu\n \\\u003e **APIs \\& Services**\n \\\u003e **Library** .\n \\\u003e search for **Cloud Logging API**\n \\\u003e click **Cloud Logging API**\n \\\u003e **Enable**.\n\n [Enable the API](https://console.cloud.google.com/marketplace/product/google/logging.googleapis.com)\n\nTurn on error logging\n\nTurn on error logging and when a Chat app returns an error, it logs it to Cloud logging. Because Cloud Logging [incurs a cost](https://cloud.google.com/stackdriver/pricing), you might want to [turn off error logging](#turn-off-error-logging) after you finish troubleshooting.\n\n1. In the Google Cloud console, go to the Chat API **configuration** page. Click **Menu**\n menu\n \\\u003e **More products**\n \\\u003e **Google Workspace**\n \\\u003e **Product Library**\n \\\u003e **Google Chat API**\n \\\u003e **Manage**\n \\\u003e **Configuration**.\n\n [Go to Chat API](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat)\n2. Under Functionality, select **Log errors to Cloud Logging**.\n\n3. Click **Save**.\n\nNow, whenever the Chat app returns an error, the error gets logged to Cloud Logging.\n\nTurn off error logging\n\nBecause Cloud Logging [incurs a cost](https://cloud.google.com/stackdriver/pricing), you might want to turn off error logging.\n\n1. In the Google Cloud console, go to the Chat API **configuration** page. Click **Menu**\n menu\n \\\u003e **More products**\n \\\u003e **Google Workspace**\n \\\u003e **Product Library**\n \\\u003e **Google Chat API**\n \\\u003e **Manage**\n \\\u003e **Configuration**.\n\n [Go to Chat API](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat)\n2. Under Functionality, deselect **Log errors to Cloud Logging**.\n\n3. Click **Save**.\n\nNow, 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.\n\nRelated topics\n\nAfter turning on error logging, you're ready to [query error logs](/workspace/chat/query-logs) for your Chat app."]]