spee.ch/helpers/configVarCheck.js

18 lines
590 B
JavaScript
Raw Normal View History

2017-09-25 18:13:18 +02:00
const logger = require('winston');
2018-03-09 05:48:29 +01:00
module.exports = (config) => {
2017-09-25 18:31:26 +02:00
// get the config file
2017-11-07 00:18:45 +01:00
for (let configCategoryKey in config) {
if (config.hasOwnProperty(configCategoryKey)) {
// get the final variables for each config category
2017-11-07 00:18:45 +01:00
const configVariables = config[configCategoryKey];
2017-09-25 18:31:26 +02:00
for (let configVarKey in configVariables) {
if (configVariables.hasOwnProperty(configVarKey)) {
// print each variable
2017-09-25 18:31:26 +02:00
logger.debug(`CONFIG CHECK: ${configCategoryKey}.${configVarKey} === ${configVariables[configVarKey]}`);
}
2017-09-25 18:13:18 +02:00
}
}
}
};