Skip to content

Commit a340dae

Browse files
author
Jake Champion
committed
fix(config): Call debug log methods after setting the loglevel based upon config/cli-options.
1 parent e79463b commit a340dae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ var CONFIG_SYNTAX_HELP = ' module.exports = function(config) {\n' +
357357
var parseConfig = function (configFilePath, cliOptions) {
358358
var configModule
359359
if (configFilePath) {
360-
log.debug('Loading config %s', configFilePath)
361360

362361
try {
363362
configModule = require(configFilePath)
@@ -389,7 +388,6 @@ var parseConfig = function (configFilePath, cliOptions) {
389388
return process.exit(1)
390389
}
391390
} else {
392-
log.debug('No config file specified.')
393391
// if no config file path is passed, we define a dummy config module.
394392
configModule = function () {}
395393
}
@@ -433,6 +431,12 @@ var parseConfig = function (configFilePath, cliOptions) {
433431
// configure the logger as soon as we can
434432
logger.setup(config.logLevel, config.colors, config.loggers)
435433

434+
if (configFilePath) {
435+
log.debug('Loading config %s', configFilePath)
436+
} else {
437+
log.debug('No config file specified.')
438+
}
439+
436440
return normalizeConfig(config, configFilePath)
437441
}
438442

0 commit comments

Comments
 (0)