mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 03:01:08 +01:00
Provide more error information to logs
Provides full stack instead of just message
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
var async = require('async');
|
||||
var validator = require('validator');
|
||||
var winston = require('winston');
|
||||
|
||||
var db = require('./database');
|
||||
var batch = require('./batch');
|
||||
@@ -143,8 +144,8 @@ events.output = function () {
|
||||
process.stdout.write('\nDisplaying last ten administrative events...\n'.bold);
|
||||
events.getEvents(0, 9, function (err, events) {
|
||||
if (err) {
|
||||
process.stdout.write(' Error '.red + String(err.message).reset);
|
||||
process.exit(1);
|
||||
winston.error('Error fetching events', err);
|
||||
throw err;
|
||||
}
|
||||
|
||||
events.forEach(function (event) {
|
||||
|
||||
Reference in New Issue
Block a user