mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 22:22:50 +00:00
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:
1 parent
bdbe86c0f7
commit
45aadf7442
5 files changed
+43
-19
No files matched your search
@@ -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(() => {
|
||||
|
||||
Reference in new issue
Block a user