Skip to content

Commit 2206c39

Browse files
committed
Unhandle exceptions and rejections B4 replacement
Attempts to address [comment](#1824 (comment)) by @unconfident
1 parent 2927964 commit 2206c39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/winston/logger.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ class Logger extends Transform {
107107
// Hoist other options onto this instance.
108108
this.levels = levels || this.levels || config.npm.levels;
109109
this.level = level;
110+
if(typeof logger.exceptions !== 'undefined') {
111+
logger.exceptions.unhandle();
112+
}
113+
if(typeof logger.rejections !== 'undefined') {
114+
logger.rejections.unhandle();
115+
}
110116
this.exceptions = new ExceptionHandler(this);
111117
this.rejections = new RejectionHandler(this);
112118
this.profilers = {};

0 commit comments

Comments
 (0)