Server using logger to log uncaughtException

This commit is contained in:
Wu Cheng-Han 2015-07-11 12:44:16 +08:00
parent 556338a9c6
commit 0292bfce5b
1 changed files with 4 additions and 1 deletions

5
app.js
View File

@ -387,4 +387,7 @@ if (config.usessl) {
server.listen(config.port, function () {
logger.info('HTTP Server listening at port %d', config.port);
});
}
}
process.on('uncaughtException', function (err) {
logger.error(err);
});