mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-12-11 09:28:24 +00:00
remove unused console logging fallbacks
This commit is contained in:
parent
bf455c2f7a
commit
e8c7134123
1 changed files with 5 additions and 25 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue