mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
(pm2)(log) stringify PM2 process events in JSON format
This commit is contained in:
parent
c05aa70a9c
commit
da18d52cdd
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user