Last change
on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
425 bytes
|
Line | |
---|
1 |
|
---|
2 |
|
---|
3 | function stderrAppender(layout, timezoneOffset) {
|
---|
4 | return (loggingEvent) => {
|
---|
5 | process.stderr.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 stderrAppender(layout, config.timezoneOffset);
|
---|
15 | }
|
---|
16 |
|
---|
17 | module.exports.configure = configure;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.