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.

Cloud Database Migration Service

Logging API service name: datamigration.googleapis.com

Log name Monitored resource Payload
migration_job_event datamigration.googleapis.com/MigrationJob type.googleapis.com/storage.clouddms.logging.v1.MigrationJobEventLog
connection_profile_event datamigration.googleapis.com/ConnectionProfile type.googleapis.com/storage.clouddms.logging.v1.ConnectionProfileEventLog

Cloud Functions

Logging API service name: cloudfunctions.googleapis.com

Log name Monitored resource Payload
cloud-functions cloud_function Cloud Functions writes logs to this stream that indicate the start and end of execution, as well as the stdout and stderr from those executions.

Cloud Logging API

Logging API service name: logging.googleapis.com

Log name Monitored resource Payload
sink_error logging_sink A report of an error encountered while trying to export data to a configured log sink.

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 Run

Logging API service name: run.googleapis.com

Log name Monitored resource Payload
stdout cloud_run_revision Cloud Run stdout logs. Each entry contains a line (or multiple lines, if they match a known multi-line exception format like a stack trace) written to stdout from the user container.
stderr cloud_run_revision Cloud Run stderr logs. Each entry contains a line (or multiple lines, if they match a known multi-line exception format like a stack trace) written to stderr from the user container.
requests cloud_run_revision Cloud Run request logs. Each request served by a Cloud Run service should have a corresponding request log entry.
/dev/log cloud_run_revision Cloud Run syslogs. These are syslog-structured logs written to /dev/log in the user container.
/var/log cloud_run_revision Cloud Run /var/log logs. Each entry contains a line (or multiple lines, if they match a known multi-line exception format like a stack trace) written to /var/log/** from the user container.

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.

Dataproc

Logging API service name: dataproc.googleapis.com

Log name Monitored resource Payload
autoscaler cloud_dataproc_cluster type.googleapis.com/google.cloud.dataproc.logging.AutoscalerLog

GKE On-prem (Anthos)

Logging API service name: anthos.googleapis.com

Log name Monitored resource Payload
seesaw_engine anthos_l4lb These logs are from seesaw_engine on the Seesaw VM instances running in GKE OnPrem.
seesaw_ha anthos_l4lb These logs are from seesaw_ha on the Seesaw VM instances running in GKE OnPrem.
seesaw_healthcheck anthos_l4lb These logs are from seesaw_healthcheck on the Seesaw VM instances running in GKE OnPrem.
seesaw_ncc anthos_l4lb These logs are from seesaw_ncc on the Seesaw VM instances running in GKE OnPrem.
seesaw_ecu anthos_l4lb These logs are from seesaw_ecu on the Seesaw VM instances running in GKE OnPrem.
seesaw_config anthos_l4lb These logs are from seesaw_config on the Seesaw VM instances running in GKE OnPrem.

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

SaaS Lifecycle Management

Logging API service name: saasmanagement.googleapis.com

Log name Monitored resource Payload
terraform_internal saasmanagement.googleapis.com/Instance type.googleapis.com/google.cloud.saasaccelerator.management.logs.v1.InstanceEvent

Serial Console

Logging API service name: serialconsole.googleapis.com

Log name Monitored resource Payload
console_output gce_instance A virtual machine instance has four virtual serial ports. The instance's operating system, BIOS, and other system-level entities often write output to the serial ports, which makes them useful for troubleshooting crashes, failed boots, startup issues, or shutdown issues.

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.