Overview
This page describes how to find and use Cloud Logging to view and query logs for your Database Migration Service instance.
Database Migration Service logging reference
See the Google Cloud platform logging page for definitions of log file names, monitored resources, and payloads for Database Migration Service.
View Cloud SQL logs
Database Migration Service uses Cloud Logging. See the Cloud Logging documentation for complete information and review the Cloud SQL sample queries.
To view logs for your Cloud SQL instance log entries:
Console
- Go to the Logs Explorer
- 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.googlapis.com/mysql-general.log
- cloudsql.googleapis.com/mysql.err
- 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.
gcloud logging read "projects/[PROJECT_ID]/logs/cloudsql.googleapis.com/mysql-general.log" --limit=10
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 2024-11-19 UTC.