Skip to content

Commit afdf4b4

Browse files
committed
add CONFG.LOG_DATE_FORMAT
1 parent 2163adc commit afdf4b4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@
362362
providerOptions: {
363363
"readability": {},
364364
"twitter.status": {}
365-
}
365+
},
366+
367+
LOG_DATE_FORMAT: "\\[YY-MM-DD HH:mm:ss\\]:"
366368
};
367369

368370
// Providers config loader.

logging.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export default function log() {
1313
}
1414
}
1515

16-
args.splice(0, 0, "--", moment().utc().format("\\[YY-MM-DD HH:mm:ss\\]:") + process.pid);
16+
if (CONFIG.LOG_DATE_FORMAT) {
17+
args.splice(0, 0, "--", moment().utc().format(CONFIG.LOG_DATE_FORMAT) + process.pid);
18+
} else {
19+
args.splice(0, 0, "--", "pid:" + process.pid);
20+
}
1721

1822
console.log.apply(console, args);
1923
};

0 commit comments

Comments
 (0)