Skip to content

Commit bf84d46

Browse files
committed
Adding winston logger for sync cli
1 parent 3bb6a6b commit bf84d46

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

bin/helpers/logger.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ const winstonLoggerParams = {
2121
],
2222
};
2323

24+
const winstonSyncCliLoggerParams = {
25+
transports: [
26+
new (winston.transports.Console)({
27+
formatter: (options) => {
28+
return (options.message ? options.message : '');
29+
}
30+
}),
31+
]
32+
}
33+
2434
const winstonFileLoggerParams = {
2535
transports: [
2636
new winston.transports.File({
@@ -31,3 +41,4 @@ const winstonFileLoggerParams = {
3141

3242
exports.winstonLogger = new winston.Logger(winstonLoggerParams);
3343
exports.fileLogger = new winston.Logger(winstonFileLoggerParams);
44+
exports.syncCliLogger = new winston.Logger(winstonSyncCliLoggerParams);

0 commit comments

Comments
 (0)