Fix the logLevelFilter with lazy loading
This commit is contained in:
parent
23a2758a6d
commit
89f3659825
@ -1,4 +1,5 @@
|
|||||||
var levels = require('../levels');
|
var levels = require('../levels');
|
||||||
|
var log4js = require('../log4js');
|
||||||
|
|
||||||
function logLevelFilter (levelString, appender) {
|
function logLevelFilter (levelString, appender) {
|
||||||
var level = levels.toLevel(levelString);
|
var level = levels.toLevel(levelString);
|
||||||
@ -10,10 +11,11 @@ function logLevelFilter (levelString, appender) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function configure(config) {
|
function configure(config) {
|
||||||
var appender = config.makers[config.appender.type](config.appender);
|
log4js.loadAppender(config.appender.type);
|
||||||
|
var appender = log4js.appenderMakers[config.appender.type](config.appender);
|
||||||
return logLevelFilter(config.level, appender);
|
return logLevelFilter(config.level, appender);
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.name = "logLevelFilter";
|
exports.name = "logLevelFilter";
|
||||||
exports.appender = logLevelFilter;
|
exports.appender = logLevelFilter;
|
||||||
exports.configure = configure;
|
exports.configure = configure;
|
||||||
|
Loading…
Reference in New Issue
Block a user