mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
Provide more error information to logs
Provides full stack instead of just message
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user