Select an existing Cloud SQL project at the top of the page.
In the Query builder, add the following:
Resource: select Cloud SQL Database. In the dialog, select a
Cloud SQL instance.
Log names: scroll to the Cloud SQL section and select
appropriate log files for your instance. For example:
cloudsql.googleapis.com/postgres.log
Severity: select a log level.
Time range: select a preset or create a custom range.
gcloud
Use the gcloud logging
command to view log entries. In the example below, replace PROJECT_ID.
The limit
flag is an optional parameter that indicates the maximum number of entries to
return.
[[["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-06-05 UTC."],[[["This page explains how to access and utilize Cloud Logging for monitoring and querying logs related to your Database Migration Service instances."],["Database Migration Service leverages Cloud Logging, and the Google Cloud platform logging page provides definitions for log file names, monitored resources, and payloads."],["You can view logs for your Cloud SQL instances through the Logs Explorer in the Google Cloud console by selecting your project, choosing \"Cloud SQL Database\" as the resource, selecting appropriate log files, specifying the log level, and defining a time range."],["The `gcloud logging read` command can be used to view log entries via the command line, with an option to limit the number of entries returned."]]],[]]