-
Notifications
You must be signed in to change notification settings - Fork 764
Closed
Milestone
Description
I want to reload / update my configuration, but I get memory leak warning.
- log4js v2.5.3
- node.js v8.9.0
- macOS v10.13.4
const log4js = require('log4js');
const options = {
appenders: {
foo: { type: 'file', filename: 'foo.log' },
},
categories: {
default: { appenders: ['foo'], level: 'info' },
},
};
const loop = (index = 0) => {
if (index < 11) {
log4js.configure(options);
log4js.shutdown(() => loop(++index));
}
};
loop();throw:
(node:19311) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added. Use emitter.setMaxListeners() to increase limit
Or is there any other way to reload / update configuration?
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels