mirror of
https://git.boykissers.com/pawkey/pawkey-sk.git
synced 2025-12-20 04:04:16 +00:00
add additional process exit loggers
This commit is contained in:
@@ -73,8 +73,26 @@ async function main() {
|
||||
}));
|
||||
|
||||
// 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.');
|
||||
}
|
||||
});
|
||||
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}.`);
|
||||
}
|
||||
});
|
||||
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}`);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user