Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
feat(logging): add log when mysql pool enqueues
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Apr 20, 2015
1 parent bcf6319 commit 461b5c1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/db/mysql/index.js
Expand Up @@ -28,7 +28,13 @@ function MysqlStore(options) {
}
return next();
};
this._pool = mysql.createPool(options);
logger.info('pool.create', { options: options });
var pool = this._pool = mysql.createPool(options);
pool.on('enqueue', function() {
logger.info('pool.enqueue', {
queueLength: pool._connectionQueue && pool._connectionQueue.length
});
});
}

// Apply patches up to the current patch level.
Expand Down

0 comments on commit 461b5c1

Please sign in to comment.