summaryrefslogtreecommitdiff
path: root/packages/backend/src/boot/entry.ts
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-07-07 11:45:01 -0400
committerdakkar <dakkar@thenautilus.net>2025-07-27 17:57:30 +0100
commite8c71341237b21cde103c0c0a9a67647ba605bac (patch)
treec1af5b08dc22ef372ebe83870e27fafb3b20cf9c /packages/backend/src/boot/entry.ts
parentuse logger instead of console for uncaughtException debug lines (diff)
downloadsharkey-e8c71341237b21cde103c0c0a9a67647ba605bac.tar.gz
sharkey-e8c71341237b21cde103c0c0a9a67647ba605bac.tar.bz2
sharkey-e8c71341237b21cde103c0c0a9a67647ba605bac.zip
remove unused console logging fallbacks
Diffstat (limited to '')
-rw-r--r--packages/backend/src/boot/entry.ts30
1 files changed, 5 insertions, 25 deletions
diff --git a/packages/backend/src/boot/entry.ts b/packages/backend/src/boot/entry.ts
index 530c75cc8e..bbe6a57383 100644
--- a/packages/backend/src/boot/entry.ts
+++ b/packages/backend/src/boot/entry.ts
@@ -55,11 +55,7 @@ async function main() {
// Display detail of unhandled promise rejection
if (!envOption.quiet) {
process.on('unhandledRejection', e => {
- try {
- logger.error('Unhandled rejection:', inspect(e));
- } catch {
- console.error('Unhandled rejection:', inspect(e));
- }
+ logger.error('Unhandled rejection:', inspect(e));
});
}
@@ -83,34 +79,18 @@ async function main() {
// Display detail of uncaught exception
process.on('uncaughtExceptionMonitor', (err, origin) => {
- try {
- logger.error(`Uncaught exception (${origin}):`, err);
- } catch {
- console.error(`Uncaught exception (${origin}):`, err);
- }
+ logger.error(`Uncaught exception (${origin}):`, err);
});
// Dying away...
process.on('disconnect', () => {
- try {
- logger.warn('IPC channel disconnected! The process may soon die.');
- } catch {
- console.warn('IPC channel disconnected! The process may soon die.');
- }
+ logger.warn('IPC channel disconnected! The process may soon die.');
});
process.on('beforeExit', code => {
- try {
- logger.warn(`Event loop died! Process will exit with code ${code}.`);
- } catch {
- console.warn(`Event loop died! Process will exit with code ${code}.`);
- }
+ logger.warn(`Event loop died! Process will exit with code ${code}.`);
});
process.on('exit', code => {
- try {
- logger.info(`The process is going to exit with code ${code}`);
- } catch {
- console.info(`The process is going to exit with code ${code}`);
- }
+ logger.info(`The process is going to exit with code ${code}`);
});
//#endregion