Skip to content

Commit 013487b

Browse files
Merge pull request #295 from sushobhit-lt/config-log
add log for config file
2 parents 483ff58 + 46310ad commit 013487b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib/ctx.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default (options: Record<string, string>): Context => {
2626
try {
2727
if (options.config) {
2828
config = JSON.parse(fs.readFileSync(options.config, 'utf-8'));
29+
logger.debug(`Config file ${options.config} loaded: ${JSON.stringify(config, null, 2)}`);
2930

3031
// resolutions supported for backward compatibility
3132
if (config.web?.resolutions) {
@@ -37,6 +38,8 @@ export default (options: Record<string, string>): Context => {
3738
if (!validateConfig(config)) {
3839
throw new Error(validateConfig.errors[0].message);
3940
}
41+
} else {
42+
logger.info("## No config file provided. Using default config.");
4043
}
4144
port = parseInt(options.port || '49152', 10);
4245
if (isNaN(port) || port < 1 || port > 65535) {

0 commit comments

Comments
 (0)