Skip to content

Commit ff187f4

Browse files
committed
Allow custom exception level
1 parent 6cf229d commit ff187f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/winston/transports/transport.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var Transport = exports.Transport = function (options) {
2525
this.name = options.name || this.name;
2626

2727
this.handleExceptions = options.handleExceptions || false;
28+
this.exceptionsLevel = options.exceptionsLevel || 'error';
2829
};
2930

3031
//
@@ -117,5 +118,5 @@ Transport.prototype.logException = function (msg, meta, callback) {
117118

118119
this.once('logged', onLogged);
119120
this.once('error', onError);
120-
this.log('error', msg, meta, function () { });
121+
this.log(self.exceptionsLevel, msg, meta, function () { });
121122
};

0 commit comments

Comments
 (0)