From 0292bfce5bb6f62363be8b54db064f642a899526 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sat, 11 Jul 2015 12:44:16 +0800 Subject: [PATCH] Server using logger to log uncaughtException --- app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 8f84a0218..628f46315 100644 --- a/app.js +++ b/app.js @@ -387,4 +387,7 @@ if (config.usessl) { server.listen(config.port, function () { logger.info('HTTP Server listening at port %d', config.port); }); -} \ No newline at end of file +} +process.on('uncaughtException', function (err) { + logger.error(err); +}); \ No newline at end of file