Include PID in exception logs

This commit is contained in:
Zaid Abdulla committed 2017-09-16 22:36:42 -07:00
1 parent 73295729c8
commit 3fc13317a2
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -131,7 +131,8 @@ function start(service) {
process.on("uncaughtException", function(err) { process.on("uncaughtException", function(err) {
logger.error({ logger.error({
message: "Uncaught exception in master process, exiting", message: "Uncaught exception in master process, exiting",
exception: err exception: err,
pid: process.pid
}); });
cluster.removeListener("exit", restartWorker); cluster.removeListener("exit", restartWorker);
for (let pid in cluster.workers) for (let pid in cluster.workers)
+2 -1
View File
@@ -66,7 +66,8 @@ exit = () ->
process.on('uncaughtException', (err) -> process.on('uncaughtException', (err) ->
logger.error({ logger.error({
message: 'Uncaught exception' message: 'Uncaught exception'
exception: err exception: err,
pid: process.pid
}) })
exit() exit()
) )