Skip to content

Commit 99fd3f0

Browse files
Jake Championdignifiedquire
authored andcommitted
fix(config): Call debug log methods after setting the loglevel based upon config/cli-options.
1 parent 6d353dc commit 99fd3f0

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ var CONFIG_SYNTAX_HELP = ' module.exports = function(config) {\n' +
365365
var parseConfig = function (configFilePath, cliOptions) {
366366
var configModule
367367
if (configFilePath) {
368-
log.debug('Loading config %s', configFilePath)
369368

370369
try {
371370
configModule = require(configFilePath)
@@ -397,7 +396,6 @@ var parseConfig = function (configFilePath, cliOptions) {
397396
return process.exit(1)
398397
}
399398
} else {
400-
log.debug('No config file specified.')
401399
// if no config file path is passed, we define a dummy config module.
402400
configModule = function () {}
403401
}
@@ -441,6 +439,12 @@ var parseConfig = function (configFilePath, cliOptions) {
441439
// configure the logger as soon as we can
442440
logger.setup(config.logLevel, config.colors, config.loggers)
443441

442+
if (configFilePath) {
443+
log.debug('Loading config %s', configFilePath)
444+
} else {
445+
log.debug('No config file specified.')
446+
}
447+
444448
return normalizeConfig(config, configFilePath)
445449
}
446450

0 commit comments

Comments
 (0)