mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
21 lines
498 B
TypeScript
21 lines
498 B
TypeScript
/* eslint-disable no-console */
|
|
import logger from "./Logger";
|
|
|
|
process.on("exit", () => {
|
|
logger.debug("Server Shutting Shutdown");
|
|
});
|
|
|
|
process.on(
|
|
"unhandledRejection",
|
|
(reason: unknown, promise: Promise<unknown>) => {
|
|
logger.error("Unhandled rejection in server process occurred");
|
|
logger.error(reason);
|
|
logger.error(promise);
|
|
},
|
|
);
|
|
|
|
process.on("uncaughtException", (err: Error) => {
|
|
logger.error("Uncaught exception in server process occurred");
|
|
logger.error(err);
|
|
});
|