Open deftscorpio opened 7 years ago
facing the same issue!
"log4js":"2.5.3" "log4js-node-mongodb": "2.2.1"
log4js dont have addAppender function; base code is const log4js = { getLogger, configure, shutdown, connectLogger, levels, addLayout: layouts.addLayout, }; module.exports = log4js;
facing the same issue
I am getting exception when trying this line:
log4js.addAppender( mongoAppender.appender({connectionString: 'localhost:27017/logs'}), 'cheese' );Exception:
Exception has occurred: Error TypeError: log4js.addAppender is not a function at Object. (d:\myScriptFile.js:28:8)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Timeout.Module.runMain [as _onTimeout] (module.js:590:10)
at tryOnTimeout (timers.js:232:11)
at Timer.listOnTimeout (timers.js:202:5)
Using these versions:
"log4js": "2.0.1", "log4js-node-mongodb": "2.2.1",
Thanks.