diff --git a/lib/winston/logger.js b/lib/winston/logger.js index dc7866854..21b484d57 100644 --- a/lib/winston/logger.js +++ b/lib/winston/logger.js @@ -107,6 +107,12 @@ class Logger extends Transform { // Hoist other options onto this instance. this.levels = levels || this.levels || config.npm.levels; this.level = level; + if(typeof logger.exceptions !== 'undefined') { + logger.exceptions.unhandle(); + } + if(typeof logger.rejections !== 'undefined') { + logger.rejections.unhandle(); + } this.exceptions = new ExceptionHandler(this); this.rejections = new RejectionHandler(this); this.profilers = {};