feat: display stack trace on winston.error

This commit is contained in:
Barış Soner Uşaklı
2020-06-20 23:32:12 -04:00
parent 55f8f99bcd
commit e80379dc0e
31 changed files with 43 additions and 44 deletions

View File

@@ -48,9 +48,9 @@ module.exports.app = app;
server.on('error', function (err) {
if (err.code === 'EADDRINUSE') {
winston.error('NodeBB address in use, exiting...', err);
winston.error('NodeBB address in use, exiting...', err.stack);
} else {
winston.error(err);
winston.error(err.stack);
}
throw err;
@@ -265,7 +265,7 @@ function listen(callback) {
oldUmask = process.umask('0000');
module.exports.testSocket(socketPath, function (err) {
if (err) {
winston.error('[startup] NodeBB was unable to secure domain socket access (' + socketPath + ')', err);
winston.error('[startup] NodeBB was unable to secure domain socket access (' + socketPath + ')', err.stack);
throw err;
}