Skip to content

Commit

Permalink
Unhandle exceptions and rejections B4 replacement
Browse files Browse the repository at this point in the history
Attempts to address [comment](#1824 (comment)) by @unconfident
  • Loading branch information
wbt committed Jan 10, 2022
1 parent 2927964 commit 2206c39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/winston/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down

0 comments on commit 2206c39

Please sign in to comment.