Last change
on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
418 bytes
|
Line | |
---|
1 |
|
---|
2 |
|
---|
3 | function stdoutAppender(layout, timezoneOffset) {
|
---|
4 | return (loggingEvent) => {
|
---|
5 | process.stdout.write(`${layout(loggingEvent, timezoneOffset)}\n`);
|
---|
6 | };
|
---|
7 | }
|
---|
8 |
|
---|
9 | function configure(config, layouts) {
|
---|
10 | let layout = layouts.colouredLayout;
|
---|
11 | if (config.layout) {
|
---|
12 | layout = layouts.layout(config.layout.type, config.layout);
|
---|
13 | }
|
---|
14 | return stdoutAppender(layout, config.timezoneOffset);
|
---|
15 | }
|
---|
16 |
|
---|
17 | exports.configure = configure;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.