log4js-node/test/tap/dummy-appender.js
Paul Harapiak 6bff3bb7f4 feat(categoryInheritance): using preProcessingListener
for preparing config before validation and interpretation
2019-05-04 12:10:16 -04:00

20 lines
550 B
JavaScript

// Dummy appender for test purposes; set config.label to identify instances in a test
function createDummyAppender() { // This is the function that generates an appender function
// This is the appender function itself
return (/* loggingEvent */) => {
// do nothing
// console.log(loggingEvent.data);
};
}
function configure(config) {
// create a new appender instance
const appender = createDummyAppender();
appender.label = config.label;
return appender;
}
// export the only function needed
exports.configure = configure;