Files
oneuptime/CommonServer/Utils/Process.ts
Nawaz Dhandala 1ed1bc49aa fix
2022-04-15 12:54:26 +01:00

16 lines
437 B
TypeScript

/* eslint-disable no-console */
import logger from './Logger';
process.on('exit', () => {
logger.info('Server Shutting Shutdown');
});
process.on('unhandledRejection', (err: $TSFixMe) => {
logger.error('Unhandled rejection in server process occurred');
logger.error(err);
});
process.on('uncaughtException', (err: $TSFixMe) => {
logger.error('Uncaught exception in server process occurred');
logger.error(err);
});