Google Cloud platform logs

This page provides basic information about the Google Cloud platform logs that are available in Cloud Logging, as well as next steps for viewing and managing platform logs.

Overview

Logging receives, indexes, and stores log entries from Google Cloud. Google Cloud platform logs are service-specific logs that can help you debug and troubleshoot issues, as well as better understand the Google Cloud services you're using.

The Google Cloud platform logs visible to you in Cloud Logging vary, depending on which Google Cloud resources you're using in your Google Cloud project or organization.

Index of Google Cloud platform logs

Following are the Google Cloud platform logs supported by Cloud Logging.

APS SSA Service

Logging API service name: ssa--krm.googleapis.com

Log name Monitored resource Payload
ucp saas_instance KRM API control plane request logs from APS.

Cloud Monitoring API

Logging API service name: monitoring.googleapis.com

Log name Monitored resource Payload
uptime_checks uptime_url type.googleapis.com/google.monitoring.v3.UptimeCheckConfig, type.googleapis.com/google.monitoring.v3.UptimeCheckResult
uptime_checks gae_app type.googleapis.com/google.monitoring.v3.UptimeCheckConfig, type.googleapis.com/google.monitoring.v3.UptimeCheckResult
uptime_checks gce_instance type.googleapis.com/google.monitoring.v3.UptimeCheckConfig, type.googleapis.com/google.monitoring.v3.UptimeCheckResult
uptime_checks aws_ec2_instance type.googleapis.com/google.monitoring.v3.UptimeCheckConfig, type.googleapis.com/google.monitoring.v3.UptimeCheckResult
uptime_checks aws_elb_load_balancer type.googleapis.com/google.monitoring.v3.UptimeCheckConfig, type.googleapis.com/google.monitoring.v3.UptimeCheckResult

Cloud SQL

Logging API service name: cloudsql.googleapis.com

Log name Monitored resource Payload
mysql.err cloudsql_database The error log contains a record and diagnostic messages such as errors, warnings, and notes that occur during server startup, shutdown, and while the server is running.
mysql-slow.log cloudsql_database The slow query log consists of SQL statements that take more than long_query_time seconds to execute.
mysql-general.log cloudsql_database The general query log records when clients connect or disconnect, and it logs each SQL statement received from clients.
mysql-audit.log cloudsql_database They have audit logs for user activities on MySQL.
replication-setup.log cloudsql_database They are related to external master replication setup.
mysql-upgrade.log cloudsql_database Used to contain mysql_upgrade logs. Now deprecated.
postgres.log cloudsql_database It contains the database server's log output from the Cloud SQL instance.
postgres-audit.log cloudsql_database It contains the audit log entries from the pgAudit extension in the Cloud SQL instance.
sqlserver.err cloudsql_database These logs are from the SQL Server errorlog on the Cloud SQL instance.
sqlagent.out cloudsql_database These logs are from sqlagent.out on the Cloud SQL instance.
operationdetails.log cloudsql_database These logs show details of long running operations such as Import SQL for SQL Server instances.

Partner Data Ingestion

Logging API service name: partnerdataingestion.googleapis.com

Log name Monitored resource Payload
ingest_details consumed_api type.googleapis.com/google.search.partnerdataingestion.logging.v1.IngestDetailsLog

Recommender API

Logging API service name: recommender.googleapis.com

Log name Monitored resource Payload
actions recommender v1: type.googleapis.com/google.cloud.recommender.logging.v1.ActionLog
v1beta1: type.googleapis.com/google.cloud.recommender.logging.v1beta1.ActionLog
actions recommender_insight_type v1: type.googleapis.com/google.cloud.recommender.logging.v1.InsightActionLog
v1beta1: type.googleapis.com/google.cloud.recommender.logging.v1beta1.InsightActionLog

Using and managing platform logs

The following sections provide basic information about using and managing platform logs in Cloud Logging.

Log entry structure

Cloud Logging represents logs using a single data type, LogEntry, which defines certain common data for all log entries as well as the payloads that Google Cloud services can include.

Every log entry is characterized by the following information:

  • A log name. This includes the identifier of the Google Cloud project, folder, or organization that contains the log entry.
  • The resource from which the log entry originated. This consists of a resource type from the Monitored resource list and additional label values that identify a specific instance.
  • A timestamp.
  • A payload, which can be represented as textPayload, jsonPayload, or (for some Google Cloud services) protoPayload.

Note that if the [LOG_ID] string in a log entry's logName field is prefixed by serviceName.googleapis.com, it is a Google Cloud platform log entry.

For more information about log entry contents, see the Logging API reference for the LogEntry type.

Viewing logs

There are several ways to view your platform log entries:

Routing logs

You can control how your log entries are routed and stored. The Logs Router checks each log entry against existing rules to determine which log entries to discard, which log entries to store in Cloud Logging, and which log entries to include in exports to other destinations.

For details, see Logs Router overview.

Logs retention

Log entries are stored in logs buckets for a specified length of time and are then deleted. For more information, see Storing logs.

Pricing

For information on logs pricing, see Logging pricing.