The order in which the appenders are defined seems very important. This gives some strange results:
This sample:
const log4js = require('log4js');
log4js.configure({
appenders: {
filteredConsole: { type: 'logLevelFilter', appender: 'console', level: 'info' },
console: { type: 'stdout' }
},
categories: {
default: { appenders: ['filteredConsole'], level: 'trace' }
}
});
log4js.getLogger('demo').info('test');
Results in error: TypeError: appender is not a function.
A solution would be to sort the appenders topologically. We could use something like toposort
The order in which the appenders are defined seems very important. This gives some strange results:
This sample:
Results in error:
TypeError: appender is not a function.A solution would be to sort the appenders topologically. We could use something like toposort