From da18d52cdd67c222b8761886984a30b90efa00dc Mon Sep 17 00:00:00 2001 From: Unitech Date: Sat, 6 Aug 2016 21:14:14 -0700 Subject: [PATCH] (pm2)(log) stringify PM2 process events in JSON format --- lib/API/Log.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/API/Log.js b/lib/API/Log.js index 5c5cbfd5..bbf3b14a 100644 --- a/lib/API/Log.js +++ b/lib/API/Log.js @@ -195,12 +195,12 @@ Log.jsonStream = function(Client, app_name) { if (err) console.error(err); bus.on('process:event', function(packet) { - console.log({ + console.log(JSON.stringify({ timestamp : moment(packet.at).toString(), type : 'process_event', status : packet.event, app_name : packet.process.name - }); + })); }); bus.on('log:*', function(type, packet) {