make unhandled promise rejections easier to find among logs

This commit is contained in:
Matteo Pagliazzi 2018-05-01 12:09:30 +02:00
parent 2ccd9eaa1e
commit a864e69042

View file

@ -85,7 +85,7 @@ let loggerInterface = {
// Logs unhandled promises errors
// when no catch is attached to a promise a unhandledRejection event will be triggered
process.on('unhandledRejection', function handlePromiseRejection (reason) {
loggerInterface.error(reason);
loggerInterface.error('unhandledPromiseRejection', reason);
});
module.exports = loggerInterface;