dolthub / dolt

Dolt – Git for Data
Apache License 2.0
17.36k stars 488 forks source link

Log queries in "error running query" WARN log message #8074

Open fulghum opened 1 week ago

fulghum commented 1 week ago

Currently, Dolt sql-server logs include all the queries being executed only when logging is configured at the DEBUG level – queries are not included in the logs at the default logging level. This is important to keep the logs from growing too quickly, but can make it difficult for customers to find a query that isn't executing in Dolt correctly. When we log an "error running query" warning, if we included the query (or the first ~150 characters or so) it would make it easier for customers to identify queries that aren't executing correctly and either report them (if it's a MySQL compatibility issue) or fix them (if it's an issue with their application forming bad queries).

timsehn commented 1 week ago

There's privacy/security concerns about putting raw SQL queries in the logs by default but we could certainly make this a log level.