mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 16:27:27 +02:00
feat: display stack trace on winston.error
This commit is contained in:
@@ -48,7 +48,7 @@ Data.loadPluginInfo = async function (pluginPath) {
|
||||
} catch (err) {
|
||||
var pluginDir = path.basename(pluginPath);
|
||||
|
||||
winston.error('[plugins/' + pluginDir + '] Error in plugin.json or package.json!', err);
|
||||
winston.error('[plugins/' + pluginDir + '] Error in plugin.json or package.json!', err.stack);
|
||||
throw new Error('[[error:parse-error]]');
|
||||
}
|
||||
return pluginData;
|
||||
|
||||
@@ -291,7 +291,7 @@ Plugins.showInstalled = async function () {
|
||||
pluginData.error = false;
|
||||
return pluginData;
|
||||
} catch (err) {
|
||||
winston.error(err);
|
||||
winston.error(err.stack);
|
||||
}
|
||||
}
|
||||
const plugins = await Promise.all(pluginPaths.map(file => load(file)));
|
||||
|
||||
@@ -33,7 +33,7 @@ module.exports = function (Plugins) {
|
||||
timeout: 5000,
|
||||
}, function (err, res, body) {
|
||||
if (err) {
|
||||
return winston.error(err);
|
||||
return winston.error(err.stack);
|
||||
}
|
||||
if (res.statusCode !== 200) {
|
||||
winston.error('[plugins.submitUsageData] received ' + res.statusCode + ' ' + body);
|
||||
|
||||
Reference in New Issue
Block a user