You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
418 B
17 lines
418 B
|
|
|
|
function stdoutAppender(layout, timezoneOffset) {
|
|
return (loggingEvent) => {
|
|
process.stdout.write(`${layout(loggingEvent, timezoneOffset)}\n`);
|
|
};
|
|
}
|
|
|
|
function configure(config, layouts) {
|
|
let layout = layouts.colouredLayout;
|
|
if (config.layout) {
|
|
layout = layouts.layout(config.layout.type, config.layout);
|
|
}
|
|
return stdoutAppender(layout, config.timezoneOffset);
|
|
}
|
|
|
|
exports.configure = configure;
|