You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the latest version of PM2 there is the ability to output all logs in JSON with the following command:
pm2 logs --json
PM2 already writes all the log in the ~/.pm2/logs folder respectively. The issue is, the format
of these logs are not in JSON and it seems there is no option in the configuration to force the
format of the output to be JSON instead.
Is there something in the documentation I am missing?
A work around is writing a deamon to spawn individual processes and redirect all STDOUT of pm2 logs [app_name] --json to ~/.pm2/logs/[app_name]-[process_id]-[type].log I am hoping that something is built in PM2 to care on this instead.
The text was updated successfully, but these errors were encountered:
It is not in the documentation, but as far as I could read the source code in new version, this is possible by adding this to the ecosystem config file:
log_type : 'json'
topkat
added a commit
to topkat/pm2-hive.github.io
that referenced
this issue
May 25, 2020
With the latest version of PM2 there is the ability to output all logs in JSON with the following command:
pm2 logs --json
PM2 already writes all the log in the
~/.pm2/logs
folder respectively. The issue is, the formatof these logs are not in JSON and it seems there is no option in the configuration to force the
format of the output to be JSON instead.
Is there something in the documentation I am missing?
A work around is writing a deamon to spawn individual processes and redirect all STDOUT of
pm2 logs [app_name] --json
to~/.pm2/logs/[app_name]-[process_id]-[type].log
I am hoping that something is built in PM2 to care on this instead.The text was updated successfully, but these errors were encountered: