log4js-node-mongodb
log4js-node-mongodb copied to clipboard
Get 'Cannot read property 'category' of undefined' error
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
This will be fixed when #7 is merged this week.
Still doesn't work
was hoping to see the answer to this, having same issue
Hello, you could update the package, because the available in npm does not contain this correction, thanks.