[log] Change default error message

This commit is contained in:
Sergey Konovalov
2023-09-25 23:31:56 +03:00
parent 6f0e7882b5
commit f0f45e8f8c
2 changed files with 3 additions and 4 deletions

View File

@ -390,14 +390,13 @@ docsCoServer.install(server, () => {
app.use((err, req, res, next) => {
let ctx = new operationContext.Context();
ctx.initFromRequest(req);
ctx.logger.error(err.stack);
ctx.logger.error('default error handler:%s', err.stack);
res.sendStatus(500);
});
});
process.on('uncaughtException', (err) => {
operationContext.global.logger.error((new Date).toUTCString() + ' uncaughtException:', err.message);
operationContext.global.logger.error(err.stack);
operationContext.global.logger.error('uncaughtException:%s', err.stack);
logger.shutdown(() => {
process.exit(1);
});

2
npm-shrinkwrap.json generated
View File

@ -5226,4 +5226,4 @@
"dev": true
}
}
}
}