Added support for writing profiling logs.

For now it supports profiling database queries and
job execution time.
This commit is contained in:
baldo 2016-07-29 12:53:20 +02:00
parent f0830dc359
commit 7921178165
6 changed files with 22 additions and 8 deletions
server/db

View file

@ -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);