Cloud Logging documentation
Cloud Logging is a fully managed service that allows you to
store, search, analyze, monitor, and alert on logging data and events from
Google Cloud and Amazon Web Services. Using
Bindplane,
you can also collect this data from over 80 additional applications,
on-premises systems, and hybrid cloud systems.
Logging includes storage for logs through
log buckets, a user interface called the
Logs Explorer, and
an API to manage logs programmatically.
Logging lets you read and write log entries, query your logs, and control how you
route and use your logs.
Start your proof of concept with $300 in free credit
-
Get access to Gemini 2.0 Flash Thinking
-
Free monthly usage of popular products, including AI APIs and BigQuery
-
No automatic charges, no commitment
Keep exploring with 20+ always-free products
Access 20+ free products for common use cases, including AI APIs, VMs, data warehouses,
and more.
Training
Training and tutorials
Monitoring and logging for Cloud Functions
This hands-on lab shows you how to view your Cloud Run functions with
their execution times, execution counts, and memory usage in the Google Cloud console. These metrics are also available in Cloud Monitoring.
Training
Training and tutorials
Creating and alerting on logs-based metrics
This hands-on lab shows you how to use both system and user-defined
logs-based metrics to create charts and alerting policies.
Training
Training and tutorials
Security and access analytics
This tutorial shows how to export logs from Logging to BigQuery to meet the security and analytics requirements of your
organization's cloud infrastructure environment.
Use case
Use cases
Storing your organization's logs in a log bucket
Learn how to store your organization's logs in a single source.
Logging
Logs Buckets
Use case
Use cases
Multi-tenant logging on Google Kubernetes Engine.
Learn how to configure multi-tenant logging for GKE clusters.
Logging
GKE
Multi-tenant
Use case
Use cases
Regionalizing your project's logs using log buckets
Learn how to store your logs data in a designated region.
Data residency
Regionalization
Logging
Code sample
Code Samples
Log Entries: Write
Learn how to write log entries in Go, Java, Python, Node.js, C#, and PHP
Code sample
Code Samples
Log Entries: Advanced Write
Learn how to write log entries in Go, Java, Python, Node.js, C#, and PHP
Code sample
Code Samples
Log Entries: List
Learn how to list log entries in Go, Java, Python, Node.js, C#, and PHP
Code sample
Code Samples
Logs: Delete
Learn how to delete log entries in Go, Java, Python, Node.js, C#, and PHP
Code sample
Code Samples
Setting up Cloud Logging for Go
Create a VM instance with Python
Code sample
Code Samples
More samples
More logging-specific samples
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Cloud Logging documentation\n===========================\n\n[Read product documentation](/logging/docs/overview) **Cloud Logging** is a fully managed service that allows you to\nstore, search, analyze, monitor, and alert on logging data and events from\nGoogle Cloud and Amazon Web Services. Using\n[Bindplane](https://bindplane.com/google),\nyou can also collect this data from over 80 additional applications,\non-premises systems, and hybrid cloud systems.\n\nLogging includes storage for logs through\n[log buckets](/logging/docs/buckets), a user interface called the\n[Logs Explorer](/logging/docs/view/logs-viewer-interface), and\n[an API](/logging/docs/reference/api-overview) to manage logs programmatically.\nLogging lets you read and write log entries, query your logs, and control how you\nroute and use your logs.\n[Get started for free](https://console.cloud.google.com/freetrial) \n\n#### Start your proof of concept with $300 in free credit\n\n- Get access to Gemini 2.0 Flash Thinking\n- Free monthly usage of popular products, including AI APIs and BigQuery\n- No automatic charges, no commitment \n[View free product offers](/free/docs/free-cloud-features#free-tier) \n\n#### Keep exploring with 20+ always-free products\n\n\nAccess 20+ free products for common use cases, including AI APIs, VMs, data warehouses,\nand more.\n\nDocumentation resources\n-----------------------\n\nFind quickstarts and guides, review key references, and get help with common issues. \nformat_list_numbered\n\n### Guides\n\n-\n\n [Quickstart: Write and query log entries with the gcloud CLI](/logging/docs/write-query-log-entries-gcloud)\n\n-\n\n [Quickstart: Write and query log entries using a Python script](/logging/docs/write-query-log-entries-python)\n\n-\n\n [Using the Logs Explorer](/logging/docs/view/logs-viewer-interface)\n\n-\n\n [Logging query language](/logging/docs/view/logging-query-language)\n\n-\n\n [Building queries](/logging/docs/view/building-queries)\n\n-\n\n [Log Router overview](/logging/docs/routing/overview)\n\n-\n\n [About the Ops Agent](/logging/docs/agent/ops-agent)\n\n-\n\n [Log-based metrics](/logging/docs/logs-based-metrics)\n\n-\n\n [More guides](/logging/docs/overview)\n\nfind_in_page\n\n### Reference\n\n-\n\n [REST API](/logging/docs/reference/v2/rest)\n\n-\n\n [RPC API](/logging/docs/reference/v2/rpc)\n\n-\n\n [Logging Client Libraries](/logging/docs/reference/libraries)\n\n-\n\n [Command-line interface](/logging/docs/reference/tools/gcloud-logging)\n\n-\n\n [Monitored resources and services](/logging/docs/api/v2/resource-list)\n\n-\n\n [Introduction to the Cloud Logging API v2](/logging/docs/reference/api-overview)\n\n-\n\n [More references](/logging/docs/reference)\n\ninfo\n\n### Resources\n\n-\n\n [Quotas and limits](/logging/quotas)\n\n-\n\n [Release notes](/logging/docs/release-notes)\n\n-\n\n [Pricing](https://cloud.google.com/stackdriver/pricing)\n\n-\n\n [More resources](/logging/quotas)\n\nRelated resources\n-----------------\n\nTraining and tutorials \nUse cases \nCode samples \nExplore self-paced training, use cases, reference architectures, and code samples with examples of how to use and connect Google Cloud services. Training \nTraining and tutorials\n\n### Monitoring and logging for Cloud Functions\n\n\nThis hands-on lab shows you how to view your Cloud Run functions with\ntheir execution times, execution counts, and memory usage in the Google Cloud console. These metrics are also available in Cloud Monitoring.\n\n\n[Learn more](https://www.cloudskillsboost.google/catalog_lab/1110) \nTraining \nTraining and tutorials\n\n### Creating and alerting on logs-based metrics\n\n\nThis hands-on lab shows you how to use both system and user-defined\nlogs-based metrics to create charts and alerting policies.\n\n\n[Learn more](https://www.cloudskillsboost.google/catalog_lab/753) \nTraining \nTraining and tutorials\n\n### Security and access analytics\n\n\nThis tutorial shows how to export logs from Logging to BigQuery to meet the security and analytics requirements of your\norganization's cloud infrastructure environment.\n\n\n[Learn more](/solutions/exporting-stackdriver-logging-for-security-and-access-analytics) \nUse case \nUse cases\n\n### Storing your organization's logs in a log bucket\n\n\nLearn how to store your organization's logs in a single source.\n\nLogging Logs Buckets\n\n\u003cbr /\u003e\n\n[Learn more](/logging/docs/central-log-storage) \nUse case \nUse cases\n\n### Multi-tenant logging on Google Kubernetes Engine.\n\n\nLearn how to configure multi-tenant logging for GKE clusters.\n\nLogging GKE Multi-tenant\n\n\u003cbr /\u003e\n\n[Learn more](/stackdriver/docs/solutions/gke/multi-tenant-logging) \nUse case \nUse cases\n\n### Regionalizing your project's logs using log buckets\n\n\nLearn how to store your logs data in a designated region.\n\nData residency Regionalization Logging\n\n\u003cbr /\u003e\n\n[Learn more](/logging/docs/regionalized-logs) \nCode sample \nCode Samples\n\n### Log Entries: Write\n\n\nLearn how to write log entries in Go, Java, Python, Node.js, C#, and PHP\n\n\n[Get started](/logging/docs/samples/logging-write-log-entry) \nCode sample \nCode Samples\n\n### Log Entries: Advanced Write\n\n\nLearn how to write log entries in Go, Java, Python, Node.js, C#, and PHP\n\n\n[Get started](/logging/docs/samples/logging-write-log-entry-advanced) \nCode sample \nCode Samples\n\n### Log Entries: List\n\n\nLearn how to list log entries in Go, Java, Python, Node.js, C#, and PHP\n\n\n[Get started](/logging/docs/samples/logging-list-log-entries) \nCode sample \nCode Samples\n\n### Logs: Delete\n\n\nLearn how to delete log entries in Go, Java, Python, Node.js, C#, and PHP\n\n\n[Get started](/logging/docs/samples/logging-delete-log) \nCode sample \nCode Samples\n\n### Setting up Cloud Logging for Go\n\n\nCreate a VM instance with Python\n\n\n[Get started](/logging/docs/setup/go) \nCode sample \nCode Samples\n\n### More samples\n\n\nMore logging-specific samples\n\n\n[Learn more](/logging/docs/samples)\n\nRelated videos\n--------------"]]