add timestamp to the log

This commit is contained in:
Girish Ramakrishnan
2025-09-16 17:52:12 +02:00
parent 88e209d65b
commit 1cac2f6170

View File

@@ -72,7 +72,7 @@ async function setupNetworking() {
// 50 - internal error , 70 - SIGTERM exit
function exitSync(status) {
if (status.error) fs.write(logFd, status.error.stack + '\n', function () {});
fs.write(logFd, `Exiting with code ${status.code}\n`, function () {});
fs.write(logFd, `${(new Date()).toISOString()} Exiting with code ${status.code}\n`, function () {});
fs.fsyncSync(logFd);
fs.closeSync(logFd);
process.exit(status.code);