(pm2)(log) stringify PM2 process events in JSON format

This commit is contained in:
Unitech 2016-08-06 21:14:14 -07:00
parent c05aa70a9c
commit da18d52cdd

View File

@ -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) {