(configurationFileOrObject)
| 57 | } |
| 58 | |
| 59 | function configure(configurationFileOrObject) { |
| 60 | if (enabled) { |
| 61 | // eslint-disable-next-line no-use-before-define |
| 62 | shutdown(); |
| 63 | } |
| 64 | |
| 65 | let configObject = configurationFileOrObject; |
| 66 | |
| 67 | if (typeof configObject === 'string') { |
| 68 | configObject = loadConfigurationFile(configurationFileOrObject); |
| 69 | } |
| 70 | debug(`Configuration is ${configObject}`); |
| 71 | |
| 72 | configuration.configure(deepClone(configObject)); |
| 73 | |
| 74 | clustering.onMessage(sendLogEventToAppender); |
| 75 | |
| 76 | enabled = true; |
| 77 | |
| 78 | // eslint-disable-next-line no-use-before-define |
| 79 | return log4js; |
| 80 | } |
| 81 | |
| 82 | function isConfigured() { |
| 83 | return enabled; |
no test coverage detected