Provide more error information to logs

Provides full stack instead of just message
This commit is contained in:
Peter Jaszkowiak
2017-11-01 18:58:44 -06:00
parent ec38b18e34
commit e609e497b3
21 changed files with 59 additions and 60 deletions

View File

@@ -63,7 +63,7 @@ Plugins.init = function (nbbApp, nbbMiddleware, callback) {
Plugins.reload(function (err) {
if (err) {
winston.error('[plugins] NodeBB encountered a problem while loading plugins', err.message);
winston.error('[plugins] NodeBB encountered a problem while loading plugins', err);
return callback(err);
}
@@ -132,7 +132,7 @@ Plugins.reloadRoutes = function (callback) {
var controllers = require('./controllers');
Plugins.fireHook('static:app.load', { app: app, router: router, middleware: middleware, controllers: controllers }, function (err) {
if (err) {
winston.error('[plugins] Encountered error while executing post-router plugins hooks: ' + err.message);
winston.error('[plugins] Encountered error while executing post-router plugins hooks', err);
return callback(err);
}
@@ -218,7 +218,7 @@ Plugins.list = function (matching, callback) {
json: true,
}, function (err, res, body) {
if (err) {
winston.error('Error parsing plugins : ' + err.message);
winston.error('Error parsing plugins', err);
return callback(err);
}