NET-Web-API-w-Angular/my-app/node_modules/log4js/lib/appenders/stdout.js

16 lines
416 B
JavaScript
Raw Normal View History

2024-02-09 00:38:41 +00:00
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;