(config: any)
| 63 | const defaultLogLayoutType = 'colored'; |
| 64 | |
| 65 | const initLogging = (config: any) => { |
| 66 | // log4js.configure() modifies settings.logconfig so check for equality first. |
| 67 | log4js.configure(config); |
| 68 | log4js.getLogger('console'); |
| 69 | |
| 70 | // Overwrites for console output methods |
| 71 | console.debug = logger.debug.bind(logger); |
| 72 | console.log = logger.info.bind(logger); |
| 73 | console.warn = logger.warn.bind(logger); |
| 74 | console.error = logger.error.bind(logger); |
| 75 | }; |
| 76 | |
| 77 | // Initialize logging as early as possible with reasonable defaults. Logging will be re-initialized |
| 78 | // with the user's chosen log level and logger config after the settings have been loaded. |
no test coverage detected