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

@@ -85,7 +85,7 @@ function activate(plugin) {
},
], function (err) {
if (err) {
winston.error('An error occurred during plugin activation', err);
winston.error('An error occurred during plugin activation', err.stack);
throw err;
}
process.exit(0);
@@ -219,7 +219,7 @@ function info() {
function buildWrapper(targets, options) {
build.build(targets, options, function (err) {
if (err) {
winston.error(err);
winston.error(err.stack);
process.exit(1);
}
process.exit(0);

View File

@@ -141,7 +141,7 @@ async function resetPlugin(pluginId) {
throw new Error('plugin-not-active');
}
} catch (err) {
winston.error('[reset] Could not disable plugin: ' + pluginId + ' encountered error %s', err);
winston.error('[reset] Could not disable plugin: ' + pluginId + ' encountered error %s', err.stack);
throw err;
}
}

View File

@@ -51,7 +51,7 @@ function setup(initConfig) {
console.log('\n' + separator + '\n');
if (err) {
winston.error('There was a problem completing NodeBB setup', err);
winston.error('There was a problem completing NodeBB setup', err.stack);
throw err;
} else {
if (data.hasOwnProperty('password')) {