Added support for writing profiling logs.
For now it supports profiling database queries and job execution time.
This commit is contained in:
parent
f0830dc359
commit
7921178165
6 changed files with 22 additions and 8 deletions
server/db
|
@ -91,6 +91,10 @@ module.exports = {
|
|||
throw error;
|
||||
}
|
||||
|
||||
db.on('profile', function (sql, time) {
|
||||
Logger.tag('database').profile('[%sms]\t%s', time, sql);
|
||||
});
|
||||
|
||||
applyMigrations(db, function (err) {
|
||||
if (err) {
|
||||
Logger.tag('database').error('Error migrating database:', err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue