PINO JSON logging

This commit is contained in:
Jan Prochazka
2023-01-21 17:32:28 +01:00
parent dd230b008f
commit 4d93be61b5
47 changed files with 429 additions and 113 deletions

View File

@@ -1,3 +1,7 @@
const { getLogger } = require('dbgate-tools');
const logger = getLogger();
let counter = 0;
function childProcessChecker() {
@@ -8,7 +12,7 @@ function childProcessChecker() {
// This will come once parent dies.
// One way can be to check for error code ERR_IPC_CHANNEL_CLOSED
// and call process.exit()
console.log('parent died', ex.toString());
logger.error('parent died', ex);
process.exit(1);
}
}, 1000);