diff --git a/lib/log4js.js b/lib/log4js.js index 2b55a6f..4cd886e 100644 --- a/lib/log4js.js +++ b/lib/log4js.js @@ -358,9 +358,11 @@ function replaceConsole(logger) { function loadAppenders() { var appenderList = fs.readdirSync(__dirname + '/appenders'); appenderList.forEach(function(file) { - var appenderModule = require('./appenders/' + file); - module.exports.appenders[appenderModule.name] = appenderModule.appender; - appenderMakers[appenderModule.name] = appenderModule.configure; + if (/\.js$/.test(file)) { + var appenderModule = require('./appenders/' + file); + module.exports.appenders[appenderModule.name] = appenderModule.appender; + appenderMakers[appenderModule.name] = appenderModule.configure; + } }); } diff --git a/package.json b/package.json index d4b2e17..45db398 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "log4js", - "version": "0.3.7", + "version": "0.3.8", "description": "Port of Log4js to work with node.", "keywords": [ "logging",