fix config error logging so pino actually logs the Error object

This commit is contained in:
modeco80
2024-09-09 22:39:01 -04:00
parent 689be9d395
commit 9d57779c75

View File

@@ -33,7 +33,7 @@ try {
var configRaw = fs.readFileSync('config.toml').toString(); var configRaw = fs.readFileSync('config.toml').toString();
Config = toml.parse(configRaw); Config = toml.parse(configRaw);
} catch (e) { } catch (e) {
logger.error('Fatal error: Failed to read or parse the config file: {0}', (e as Error).message); logger.error({err: e}, 'Fatal error: Failed to read or parse the config file');
process.exit(1); process.exit(1);
} }