refactor: add severe log level

This commit is contained in:
Carlos Valente
2024-06-09 15:42:49 +02:00
committed by Carlos Valente
parent 715600a514
commit d41cd78f2e
3 changed files with 14 additions and 4 deletions
+2 -2
View File
@@ -270,13 +270,13 @@ process.on('exit', (code) => console.log(`Ontime shutdown with code: ${code}`));
process.on('unhandledRejection', async (error) => {
generateCrashReport(error);
logger.error(LogOrigin.Server, `Uncaught exception | ${error}`);
logger.crash(LogOrigin.Server, `Uncaught exception | ${error}`);
await shutdown(1);
});
process.on('uncaughtException', async (error) => {
generateCrashReport(error);
logger.error(LogOrigin.Server, `Uncaught exception | ${error}`);
logger.crash(LogOrigin.Server, `Uncaught exception | ${error}`);
await shutdown(1);
});