Skip to content

Commit 4970d57

Browse files
argument added to SetLoggerName function
1 parent 86db840 commit 4970d57

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ module.exports = {
2222
//common method for handling logged messages
2323
push: logger.methods.push,
2424
// setting logger name to Winston logger if it's used
25-
setLoggerName: function () {
26-
CONFIG.SELECTED_LOGGER = CONFIG.WINSTON_LOGGER_VERSION;
25+
setLoggerName: function (name) {
26+
if (name === 'Winston') {
27+
CONFIG.SELECTED_LOGGER = CONFIG.WINSTON_LOGGER_VERSION;
28+
}
2729
},
2830

2931
expressExceptionHandler: exception.expressExceptionHandler

0 commit comments

Comments
 (0)