diff --git a/test/integration/testEasyLoggingOnConnecting.js b/test/integration/testEasyLoggingOnConnecting.js index 18f668ba1..fea75cbb0 100644 --- a/test/integration/testEasyLoggingOnConnecting.js +++ b/test/integration/testEasyLoggingOnConnecting.js @@ -12,6 +12,7 @@ const assert = require('assert'); const logLevelBefore = Logger.getInstance().getLevel(); const {codes} = require('./../../lib/errors'); const errorMessages = require('./../../lib/constants/error_messages'); +const {configureLogger} = require("../configureLogger") let tempDir = null; describe('Easy logging tests', function () { @@ -21,10 +22,7 @@ describe('Easy logging tests', function () { }); after(async function () { - Logger.getInstance().configure({ - level: logLevelBefore, - filePath: 'snowflake.log' - }); + configureLogger() await fsPromises.rm(tempDir, { recursive: true, force: true }); }); diff --git a/test/unit/logger/easy_logging_starter_test.js b/test/unit/logger/easy_logging_starter_test.js index 6bbab94cc..06c8c6883 100644 --- a/test/unit/logger/easy_logging_starter_test.js +++ b/test/unit/logger/easy_logging_starter_test.js @@ -8,9 +8,9 @@ const fsPromises = require('fs/promises'); const path = require('path'); const os = require('os'); const Logger = require('../../../lib/logger'); +const {configureLogger} = require("../../configureLogger") require('../../../lib/snowflake'); // import of it sets up node logger const defaultConfigName = 'sf_client_config.json'; -const logLevelBefore = Logger.getInstance().getLevel(); let tempDir = null; before(async function () { @@ -18,10 +18,7 @@ before(async function () { }); after(async function () { - Logger.getInstance().configure({ - level: logLevelBefore, - filePath: 'snowflake.log' - }); + configureLogger(); await fsPromises.rm(tempDir, { recursive: true, force: true }); });