spee.ch/helpers/configVarCheck.js

20 lines
644 B
JavaScript
Raw Normal View History

2017-11-07 00:18:45 +01:00
const config = require('../config/speechConfig.js');
2017-09-25 18:13:18 +02:00
const logger = require('winston');
module.exports = function () {
2017-09-25 18:31:26 +02:00
// get the config file
2017-09-25 18:13:18 +02:00
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
}
}
}
};