Pankaj Gupta
Pankaj Gupta

Reputation: 1

unable to see Error logs for failed queries in spanner on google cloud

I am unable to see error logs for all failed(wrong) queries when run on spanner query editor on GCP And I already have all required IAM roles & permissions for viewing the logs as private logs viewer, logging Admin.

I have executed multiple wrong queries as selct * fro Employees, select * from, and unable to see error logs for all these failed queries. Can anyone help me out how to generate error logs on GCP spanner and how to find error logs in log explorer for all these failed queries.

I am able to see all the 'INFO' severity logs but couldn't find any logs with 'ERROR' severity.

Can anyone help me out how to get error logs for spanner in GCP logs explorer

Upvotes: 0

Views: 558

Answers (2)

Hailong Wen
Hailong Wen

Reputation: 336

The query editor is just a frontend application that runs in your browser, and it does not generate nor export those logs to GCP logging. If you have your own application that uses the standard logging API, you should be able to see them.

It may be worth clarifying what you want to achieve. For example, if you are trying to understand the error, then what Fanglu says can help you understand what part of the SQL went wrong. Depending on the use case, some other tools may be available.

Upvotes: 0

Fanglu Liu
Fanglu Liu

Reputation: 76

If your query syntax is incorrect, under Query->Result tab, it should show the error.pic

Upvotes: 1

Related Questions