mirror of
https://github.com/pacnpal/markov-discord.git
synced 2025-12-20 11:01:04 -05:00
More logging in config setup
This commit is contained in:
@@ -50,12 +50,11 @@ if (!configPath) {
|
|||||||
const newConfigPath = path.resolve(CONFIG_DIR, `${CONFIG_FILE_NAME}.json`);
|
const newConfigPath = path.resolve(CONFIG_DIR, `${CONFIG_FILE_NAME}.json`);
|
||||||
config = new AppConfig();
|
config = new AppConfig();
|
||||||
try {
|
try {
|
||||||
L.debug({ newConfigPath }, 'Creating new config file');
|
L.info({ newConfigPath }, 'Creating new config file');
|
||||||
fs.writeJSONSync(newConfigPath, instanceToPlain(config), { spaces: 2 });
|
fs.writeJSONSync(newConfigPath, instanceToPlain(config), { spaces: 2 });
|
||||||
L.info({ newConfigPath }, 'Wrote new default config file');
|
L.info({ newConfigPath }, 'Wrote new default config file');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
L.debug(err);
|
L.info(err, 'Not allowed to create new config. Continuing...');
|
||||||
L.info('Not allowed to create new config. Continuing...');
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
L.debug({ configPath });
|
L.debug({ configPath });
|
||||||
|
|||||||
Reference in New Issue
Block a user