mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
Merge pull request #766 from victor0801x/cp-config
fix: #734 and patch update circular-json deps
This commit is contained in:
commit
2b532ee184
@ -22,6 +22,7 @@
|
||||
*/
|
||||
const debug = require('debug')('log4js:main');
|
||||
const fs = require('fs');
|
||||
const CircularJSON = require('circular-json');
|
||||
const configuration = require('./configuration');
|
||||
const layouts = require('./layouts');
|
||||
const levels = require('./levels');
|
||||
@ -57,7 +58,11 @@ function configure(configurationFileOrObject) {
|
||||
configObject = loadConfigurationFile(configurationFileOrObject);
|
||||
}
|
||||
debug(`Configuration is ${configObject}`);
|
||||
configuration.configure(configObject);
|
||||
|
||||
// Keep the configObject remain the same
|
||||
// and clone it to avoid that is not configurable in appenders
|
||||
const clonedConfigObject = CircularJSON.parse(CircularJSON.stringify(configObject));
|
||||
configuration.configure(clonedConfigObject);
|
||||
|
||||
clustering.onMessage(sendLogEventToAppender);
|
||||
|
||||
|
||||
6
package-lock.json
generated
6
package-lock.json
generated
@ -323,9 +323,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"circular-json": {
|
||||
"version": "0.5.4",
|
||||
"resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.4.tgz",
|
||||
"integrity": "sha512-vnJA8KS0BfOihugYEUkLRcnmq21FbuivbxgzDLXNs3zIk4KllV4Mx4UuTzBXht9F00C7QfD1YqMXg1zP6EXpig=="
|
||||
"version": "0.5.5",
|
||||
"resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.5.tgz",
|
||||
"integrity": "sha512-13YaR6kiz0kBNmIVM87Io8Hp7bWOo4r61vkEANy8iH9R9bc6avud/1FT0SBpqR1RpIQADOh/Q+yHZDA1iL6ysA=="
|
||||
},
|
||||
"clean-yaml-object": {
|
||||
"version": "0.1.0",
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"lib": "lib"
|
||||
},
|
||||
"dependencies": {
|
||||
"circular-json": "^0.5.4",
|
||||
"circular-json": "^0.5.5",
|
||||
"date-format": "^1.2.0",
|
||||
"debug": "^3.1.0",
|
||||
"streamroller": "0.7.0"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user