Hi,
Not entirely sure how you would use the "
gcloud logging read" command for retrieving the requested logs. However, I was able to find out that the flag that you are referring to is included in the Cloud SQL database configuration flag list
here. Additionally, you can follow the instructions provided
here for the log_output flag. You can either do the following:
1. log_output : FILE (this is will make the log output of the slow_query_log available in the
Logs viewer section of your Cloud Platform Console.)
2. log_output : TABLE (by setting the output to TABLE, the output would be placed in a table inside your database. Note: if the table gets too large, it may cause the instance to lose
SLA coverage)
Either way, would you be able to clarify what you mean by "only 'native' MySQL log format"? Our export system of logs currently allows JSON/CSV format at the moment. Would these formats suffice for your use case?
If the product does not provide the format options you are seeking, you can always feel free to file a
Feature Request of the desired export format to the engineering team. Also, if you feel this is a limitation of Cloud SQL, you can always
use a Compute Engine instance to run MySQL. This will essentially run the database on a VM instance which in return will allow you more control on the overall configuration of how you want your database to run.
I hope this helps!