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,7 +11,8 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user