Friday, July 26, 2019

[google-cloud-sql-discuss] Feature request: log to single lines

Feature Request: Make auditing of database operations in stackdriver easier
Problem: Postgres log creates one line per row in SQL statements, which means that the in Stackdriver is multi-line. In other words, no single log captures a single event. This makes the logging hard to read, and nearly impossible to mine/ monitor.

Possible solution:
If you know what the limit is on your particular platform, you could adjust the chopping-point constant in elog.c (source)

Context: 
in order to audit postgres on Stackdriver logging, I set  log_statement=all

gcloud sql instances patch MY_INSTANCE_NAME --database-flags log_statement=all


postgres_logging2.png

Additional reading:

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/85efb420-27e7-4994-ba03-a59d225559a2%40googlegroups.com.

No comments:

Post a Comment