refactor(logger): only enable profiling with debugging

Breaks slow query warnings, but most people just set the number higher
once they get warnings anyway.
Also fixes some issues:
- profile duration formatting and time (sec to ms).
- incorrect log query/param index.
This commit is contained in:
Linden committed 2023-07-12 15:38:47 +10:00
1 parent bdbe86c0f7
commit 45aadf7442
5 files changed
+43 -19

No files matched your search

-4
View File
@@ -24,10 +24,6 @@ function setConnectionPool() {
pool.on('connection', (connection) => {
connection.query(mysql_transaction_isolation_level);
});
pool.on('acquire', (connection) => {
for (const statement of profilerStatements) connection.query(statement);
});
}
setInterval(() => {