diff --git a/src/test/unit/logging.test.ts b/src/test/unit/logging.test.ts index f3fb1bb68..11209145b 100644 --- a/src/test/unit/logging.test.ts +++ b/src/test/unit/logging.test.ts @@ -52,15 +52,14 @@ describe('Logger instances and transports tests', async () => { expect(OCEAN_NODE_LOGGER.hasDBTransport()).to.be.equal(false) const envAfter = await setupEnvironment( null, - buildEnvOverrideConfig( - [ENVIRONMENT_VARIABLES.LOG_DB, ENVIRONMENT_VARIABLES.DB_URL], - ['true', 'http://172.15.0.6:8108?apiKey=xyz'] - ) + buildEnvOverrideConfig([ENVIRONMENT_VARIABLES.LOG_DB], ['true']) ) console.log('env after', envAfter) expect(USE_DB_TRANSPORT()).to.be.equal(true) // will build the DB transport layer + console.log('before config') const config = await getConfiguration(true) + console.log('after config: ', config) // eslint-disable-next-line no-unused-vars const DB = await new Database(config.dbConfig) console.log('after DB') diff --git a/src/test/utils/hooks.ts b/src/test/utils/hooks.ts index a808d63f2..1546947d9 100644 --- a/src/test/utils/hooks.ts +++ b/src/test/utils/hooks.ts @@ -70,7 +70,7 @@ export const mochaHooks = { if (initialVariable.originalValue !== currentEnvVariable.originalValue) { // reset it to the original CONFIG_LOGGER.debug( - `(Hook) Restoring environment variable: ${varName} \ncurrent:\n ${process.env[varName]} original:\n ' ${initialVariable.originalValue}` + `(Hook) Restoring environment variable: ${varName} \ncurrent:\n ${process.env[varName]} \noriginal:\n ${initialVariable.originalValue}` ) } }) diff --git a/src/utils/logging/Logger.ts b/src/utils/logging/Logger.ts index 11c6ce95e..d7dd72637 100644 --- a/src/utils/logging/Logger.ts +++ b/src/utils/logging/Logger.ts @@ -564,6 +564,7 @@ export function configureCustomDBTransport( } if (!logger.hasDBTransport()) { logger.addTransport(customDBTransport) + logger.logMessage('Adding DB transport to Logger: ' + logger.getModuleName()) } return logger }