From f4df89fe904e059c294bf290745326ee9832d08a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 16 Oct 2018 15:17:14 -0400 Subject: [PATCH] closes #6840 --- install/web.js | 5 ++++- src/prestart.js | 4 +++- test/mocks/databasemock.js | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/install/web.js b/install/web.js index d004760d46..097d3eb9b6 100644 --- a/install/web.js +++ b/install/web.js @@ -32,9 +32,12 @@ winston.configure({ level: 'verbose', format: winston.format.combine.apply(null, formats), transports: [ - new winston.transports.Console(), + new winston.transports.Console({ + handleExceptions: true, + }), new winston.transports.File({ filename: 'logs/webinstall.log', + handleExceptions: true, }), ], }); diff --git a/src/prestart.js b/src/prestart.js index f36f6effd0..12b4d2973c 100644 --- a/src/prestart.js +++ b/src/prestart.js @@ -33,7 +33,9 @@ function setupWinston() { level: nconf.get('log-level') || (global.env === 'production' ? 'info' : 'verbose'), format: winston.format.combine.apply(null, formats), transports: [ - new winston.transports.Console(), + new winston.transports.Console({ + handleExceptions: true, + }), ], }); } diff --git a/test/mocks/databasemock.js b/test/mocks/databasemock.js index 98077ea211..dec920cb4b 100644 --- a/test/mocks/databasemock.js +++ b/test/mocks/databasemock.js @@ -173,8 +173,8 @@ function setupMockDefaults(callback) { function (next) { var groups = require('../../src/groups'); groups.resetCache(); - var posts = require('../../src/posts/cache'); - posts.cache.reset(); + var postCache = require('../../src/posts/cache'); + postCache.reset(); next(); }, function (next) {