litixsoft / log4js-node-mongodb Goto Github PK
View Code? Open in Web Editor NEWA log4js-node log appender to write logs into MongoDB
License: MIT License
A log4js-node log appender to write logs into MongoDB
License: MIT License
Please update the mongodb version
regarding security vulnarability "https://npmjs.com/advisories/1203" which is on mongodb package.
When trying to configure using the new log4js configuration format
log4js.configure({
appenders: {
out: { type: 'stdout' },
app: { type: 'log4js-node-mongodb', connectionString: config.db_log_url }
},
categories: {
default: { appenders: [ 'out', 'app' ], level: 'debug' }
}
});
the following error is raised:
C:\....\node_modules\log4js-node-mongodb\lib\index.js:100
category: loggingEvent.logger.category
^
TypeError: Cannot read property 'category' of undefined
at insert (C:\....\node_modules\log4js-node-mongodb\lib\index.js:100:50)
at Immediate.<anonymous> (C:\....\node_modules\log4js-node-mongodb\lib\index.js:139:17)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
Using log4js v2.3.3
and log4js-node-mongodb v2.2.1
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.
I started using log4js-node-mongodb, to move logs to my mongodb.
Later I started noticing, the increase in the memory consumption, whenever I switch to log4js-node-mongo appender, this is not the same when I use the console appender.
Any help is appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.