이 문서에서는 Cloud Logging 버킷으로 라우팅한 로그 항목을 찾는 방법을 설명합니다.
로그 버킷은 로그 데이터를 보관하 Google Cloud 프로젝트의 Cloud Logging 스토리지 컨테이너입니다. 로그 싱크를 만들어 로그 전체 또는 하위 집합을 Cloud Logging의 버킷으로 라우팅할 수 있습니다. 이를 통해 로그가 저장되는 Google Cloud 프로젝트와 함께 저장되는 다른 로그를 유연하게 선택할 수 있습니다.
로그가 싱크 대상에서 누락된 것으로 보이거나 싱크가 제대로 로그를 라우팅하지 않는 것으로 의심되는 경우 라우팅 및 싱크 문제 해결을 참조하세요.
가격 책정
Cloud Logging은 로그를 지원되는 대상으로 라우팅하는 데 비용을 청구하지 않지만 대상에 요금이 부과될 수 있습니다.
_Required 로그 버킷을 제외하고 Cloud Logging은 로그를 로그 버킷으로 스트리밍하고 로그 버킷의 기본 보관 기간보다 긴 스토리지에 대해 요금을 청구합니다.
Cloud Logging은 로그 복사, 로그 범위 생성 또는 분석 뷰 생성, 로그 탐색기나 로그 애널리틱스 페이지를 통해 실행되는 쿼리에 대해 요금을 부과하지 않습니다.
[[["이해하기 쉬움","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-04-22(UTC)"],[],[],null,["# View logs routed to Cloud Logging buckets\n\nThis document explains how you can find log entries that you routed to\n[Cloud Logging buckets](/logging/docs/store-log-entries).\nLog buckets are Cloud Logging storage containers in your Google Cloud projects\nthat hold your logs data. You can create log sinks to route all, or\njust a subset, of your logs to any bucket in Cloud Logging. This flexibility\nlets you choose which Google Cloud project your logs are stored in and\nwhat other logs are stored with them.\n\nLogs that you route to Cloud Logging buckets are available immediately.\n\nFor information about viewing logs routed to other destinations, see\nthe following documents:\n\n- [Cloud Storage](/logging/docs/export/storage)\n\n\u003c!-- --\u003e\n\n- [BigQuery](/logging/docs/export/bigquery)\n\n\u003c!-- --\u003e\n\n- [Pub/Sub](/logging/docs/export/pubsub)\n\nBefore you begin\n----------------\n\nFor instructions about how to create and manage log buckets,\nsee the following documents:\n\n- [Create a log bucket](/logging/docs/buckets#create_bucket)\n- [Upgrade a bucket to use Log Analytics](/logging/docs/buckets#upgrade-bucket)\n\nFor a conceptual discussion of sinks, see\n[Overview of routing and storage models: Sinks](/logging/docs/routing/overview#sinks).\n\nFor instructions about how to route your logs, see\n[Route logs to supported destinations](/logging/docs/export/configure_export_v2).\n\nView logs\n---------\n\nTo troubleshoot and view individual log entries in a log bucket,\ndo the following:\n\n1. In the Google Cloud console, go to the **Logs Explorer** page:\n\n [Go to **Logs Explorer**](https://console.cloud.google.com/logs/query)\n\n \u003cbr /\u003e\n\n If you use the search bar to find this page, then select the result whose subheading is\n **Logging**.\n2. In the **Action** toolbar, select **Refine scope**.\n3. On the **Refine scope** dialog, select **Log view**.\n4. Select one or more log views and then click **Apply**.\n\n For information about how to run queries, see\n [Build queries in the Logs Explorer](/logging/docs/view/building-queries).\n\nTo perform analytics on log entries stored in a log bucket that is upgraded\nto use Log Analytics, do the following:\n\n1. In the Google Cloud console, go to the **Log Analytics** page:\n\n [Go to **Log Analytics**](https://console.cloud.google.com/logs/analytics)\n\n \u003cbr /\u003e\n\n If you use the search bar to find this page, then select the result whose subheading is\n **Logging**.\n2. In the **Log views** list, find the view, and then select **Query** . The\n **Query** pane is populated with a default query, which includes the\n log view that is queried.\n\n You can also enter a query in the **Query** pane, or edit a displayed query.\n\n To query all logs in a log bucket, select the `_AllLogs` view for the\n log bucket.\n3. In the toolbar, click **Run query**.\n\n The query is executed and the result of the query is shown in the\n **Results** tab.\n\n You can use the toolbar options to format your query, clear the query,\n and open the BigQuery SQL reference documentation.\n\n For information about how to run queries, see\n [Query and view logs in Log Analytics](/logging/docs/analyze/query-and-view).\n\nLog entries organization\n------------------------\n\nLogging log entries are objects of type [`LogEntry`](/logging/docs/reference/v2/rest/v2/LogEntry).\n\nLog entries with the same log type, referred to as `[LOG_ID]` in the\n[`LogEntry`](/logging/docs/reference/v2/rest/v2/LogEntry) reference, usually have the same format. The following\ntable shows sample log entries: \n\n### syslog\n\nThe following is an example of a Compute Engine `syslog`: \n\n {\n insertId: \"4zymupf98ac6v\"\n jsonPayload: {\n message: \"Jul 15 13:36:33 my-instance dhclient[328]: DHCPACK of 10.240.0.48 from 169.254.169.254\"\n }\n logName: \"projects/my-gcp-project-id/logs/syslog\"\n receiveTimestamp: \"2024-07-15T13:36:33.400534415Z\"\n resource: {\n labels: {\n instance_id: \"0123456789\" (instance_name: my-instance)\n project_id: \"my-gcp-project-id\"\n zone: \"us-central1-a\"\n }\n type: \"gce_instance\"\n }\n timestamp: \"2024-07-15T13:36:33.097822178Z\"\n }\n\n### request_log\n\nThe App Engine `request_log` has log entries containing\n`protoPayload` fields which hold objects of type\n[`RequestLog`](/logging/docs/reference/v1beta3/rest/v1beta3/RequestLog): \n\n {\n httpRequest: {\n status: 200\n }\n insertId: \"669525c0000d39d1eab2bb03\"\n labels: {1}\n logName: \"projects/my-gcp-project-id/logs/appengine.googleapis.com%2Frequest_log\"\n operation: {4}\n protoPayload: {\n @type: \"type.googleapis.com/google.appengine.logging.v1.RequestLog\"\n appEngineRelease: \"1.9.71\"\n appId: \"s~my-gcp-project-id\"\n startTime: \"2024-07-15T13:36:00.861387Z\"\n ...\n }\n receiveTimestamp: \"2024-07-15T13:36:01.169966997Z\"\n resource: {2}\n spanId: \"7925702051311044593\"\n timestamp: \"2024-07-15T13:36:00.861387Z\"\n trace: \"projects/my-gcp-project-id/traces/8a4fab4bd4fbafac2a0fa901c1485847\"\n resource: {\n labels: {\n module_id: \"default\"\n project_id: \"my-gcp-project-id\"\n version_id: \"20200221t133337\"\n zone: \"us14\"\n }\n type: \"gae_app\"\n }\n }\n\n### activity\n\nThe `activity` log is an Admin Activity [audit log](/logging/docs/audit).\nIts payload is a JSON representation of the\n[`AuditLog`](/logging/docs/audit/api/ref/rest/Shared.Types/AuditLog)\ntype: \n\n {\n insertId: \"dlu8qwc69c\"\n labels: {\n compute.googleapis.com/root_trigger_id: \"a97f30b1-45ab-4c12-9309-8e8af3bb011f\"\n }\n logName: \"projects/my-gcp-project-id/logs/cloudaudit.googleapis.com%2Factivity\"\n operation: {\n id: \"operation-1721047950764-61d48b3bf2b65-1ba1f256-82e9b5fd\"\n last: true\n producer: \"compute.googleapis.com\"\n }\n protoPayload: {\n @type: \"type.googleapis.com/google.cloud.audit.AuditLog\"\n authenticationInfo: {...}\n methodName: \"v1.compute.instances.insert\"\n request: {...}\n requestMetadata: {...}\n resourceName: \"projects/my-gcp-project-id/zones/us-central1-f/instances/my-instance\"\n serviceName: \"compute.googleapis.com\"\n }\n receiveTimestamp: \"2024-07-15T12:52:41.376292847Z\"\n resource: {\n labels: {\n instance_id: \"2891866457752773984\" (instance_name: my-instance)\n project_id: \"my-gcp-project-id\"\n zone: \"us-central1-f\"\n }\n type: \"gce_instance\"\n }\n severity: \"NOTICE\"\n timestamp: \"2024-07-15T12:52:40.965840Z\"\n }\n\nTroubleshooting\n---------------\n\nIf logs seem to be missing from your sink's destination or you otherwise suspect\nthat your sink isn't properly routing logs, then see\n[Troubleshoot routing and sinks](/logging/docs/export/troubleshoot).\n\nPricing\n-------\n\nCloud Logging doesn't charge to route logs to a\nsupported destination; however, the destination might apply charges.\nWith the exception of the `_Required` log bucket,\nCloud Logging charges to stream logs into log buckets and\nfor storage longer than the default retention period of the log bucket.\n\nCloud Logging doesn't charge for copying logs,\nfor creating [log scopes](/logging/docs/log-scope/create-and-manage)\nor [analytics views](/logging/docs/analyze/about-analytics-views),\nor for queries issued through the\n**Logs Explorer** or **Log Analytics** pages.\n\nFor more information, see the following documents:\n\n- The Cloud Logging sections of the [Google Cloud Observability pricing](https://cloud.google.com/stackdriver/pricing) page.\n- Costs when routing log data to other Google Cloud services:\n\n - [Cloud Storage pricing](https://cloud.google.com/storage/pricing)\n - [BigQuery pricing](https://cloud.google.com/bigquery/pricing#data_ingestion_pricing)\n - [Pub/Sub pricing](https://cloud.google.com/pubsub/pricing)\n- [VPC flow log generation charges](https://cloud.google.com/vpc/network-pricing#network-telemetry) apply when you send and then exclude your Virtual Private Cloud flow logs from Cloud Logging."]]