add timestamp to the log
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user