refactor(logs): log configs after log file created

Closes #2515
This commit is contained in:
Rhys Arkins 2018-09-13 21:13:52 +02:00
parent d19b15b83d
commit f6d9fb620b

View file

@ -43,13 +43,10 @@ async function parseConfigs(env, argv) {
const cliConfig = await resolveConfigPresets(cliParser.getConfig(argv)); const cliConfig = await resolveConfigPresets(cliParser.getConfig(argv));
const envConfig = await resolveConfigPresets(envParser.getConfig(env)); const envConfig = await resolveConfigPresets(envParser.getConfig(env));
logger.debug({ config: fileConfig }, 'File config');
logger.debug({ config: cliConfig }, 'CLI config');
logger.debug({ config: envConfig }, 'Env config');
let config = mergeChildConfig(fileConfig, envConfig); let config = mergeChildConfig(fileConfig, envConfig);
config = mergeChildConfig(config, cliConfig); config = mergeChildConfig(config, cliConfig);
logger.debug({ config }, 'Combined config');
const combinedConfig = config;
config = mergeChildConfig(defaultConfig, config); config = mergeChildConfig(defaultConfig, config);
@ -78,6 +75,10 @@ async function parseConfigs(env, argv) {
} }
logger.trace({ config: defaultConfig }, 'Default config'); logger.trace({ config: defaultConfig }, 'Default config');
logger.debug({ config: fileConfig }, 'File config');
logger.debug({ config: cliConfig }, 'CLI config');
logger.debug({ config: envConfig }, 'Env config');
logger.debug({ config: combinedConfig }, 'Combined config');
// Get global config // Get global config
logger.trace({ config }, 'Full config'); logger.trace({ config }, 'Full config');