source: trip-planner-front/node_modules/log4js/lib/appenders/console.js@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 494 bytes
Line 
1// eslint-disable-next-line no-console
2const consoleLog = console.log.bind(console);
3
4function consoleAppender(layout, timezoneOffset) {
5 return (loggingEvent) => {
6 consoleLog(layout(loggingEvent, timezoneOffset));
7 };
8}
9
10function configure(config, layouts) {
11 let layout = layouts.colouredLayout;
12 if (config.layout) {
13 layout = layouts.layout(config.layout.type, config.layout);
14 }
15 return consoleAppender(layout, config.timezoneOffset);
16}
17
18module.exports.configure = configure;
Note: See TracBrowser for help on using the repository browser.