let { logger } = require('./logging'); var configPath = null; var config = null; function sanitizeConfig(config) { let clonedConfig = { ...config }; clonedConfig.accessToken = "******" return clonedConfig; } function getConfig(configFile) { if (config === null) { configPath = configFile; config = require(configFile); logger.info("Loaded config:"); logger.debug("%o", sanitizeConfig(config)); } return config; } exports.getConfig = getConfig