Skip to content

Commit

Permalink
fix: swap console with logger
Browse files Browse the repository at this point in the history
  • Loading branch information
0xyaco committed Sep 13, 2024
1 parent 9fb7eab commit 42bda79
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,13 @@ const main = async (): Promise<void> => {
};

process.on("unhandledRejection", (reason, p) => {
console.error(`Unhandled Rejection at: \n${inspect(p, undefined, 100)}, \nreason: ${reason}`);
logger.error(`Unhandled Rejection at: \n${inspect(p, undefined, 100)}, \nreason: ${reason}`);

process.exit(1);
});

process.on("uncaughtException", (error: Error) => {
console.error(
`An uncaught exception occurred: ${error}\n` + `Exception origin: ${error.stack}`,
);
logger.error(`An uncaught exception occurred: ${error}\n` + `Exception origin: ${error.stack}`);

process.exit(1);
});
Expand Down

0 comments on commit 42bda79

Please sign in to comment.