jmzhang18
jmzhang18

Reputation: 141

Check Google Cloud APIs & Services Error Log

Maybe I missed something, under https://console.cloud.google.com/apis/api/sqladmin.googleapis.com/overview

I saw there are a lot of errors, but when I go to Logs Viewer, I couldn't find anything. Is any way I can obtain the error log?

Upvotes: 0

Views: 2095

Answers (1)

mebius99
mebius99

Reputation: 2605

Basically, you should create a query to obtain the data you need in the Log Viewer UI: specify a type of resource and an instance name whose logs you want to view.

GCP Console => Operations => Logging => Logs Viewer 
=> Query builder => Resource 
  Cloud SQL Database = my-project:my-sql-instance

The query builder will show a query preview like below:

resource.type="cloudsql_database" 
resource.labels.database_id="my-project:my-sql-instance"

Once you click the “Run Query” button, the log entries will appear. By default log entries for the last 1 hour are shown. You can use the "Edit time" option to change this.

Please see Cloud Logging > Doc > Basic logs queries for more details.

Upvotes: 1

Related Questions