Pm2: start app.js in cluster, instance:3, how to export the log into one file:node-out.log。

Created on 17 Aug 2015  Â·  13Comments  Â·  Source: Unitech/pm2

All 13 comments

start app.js in cluster, instance:3, how to export the log into one file:node-out.log。 Do not export the log into separate file:node-out1.log,node-out2.log,node-out3.log

Thank you:)

you're welcome, feel free to file a new one if you have any confusion.

image

image

image

--merge-logs in you .json5 file, i.e.:

{
  "name":"Server-API",
  "merge_logs": true,
  ...
}

Thank you:), my cluster are running, and the i change the .json5 file by adding "merge_logs": true, then i run the command:pm2 startOrReload ecosystem.json5 --env production --no-daemon,then logs are also node-out1.log,node-out2.log,node-out3.log.

i must "pm2 delete all", and then "pm2 startOrReload ecosystem.json5 --env production --no-daemon", it will ok

i change the .json5 file, how can i let it become effective Immediately:)

pm2 delete ecosystem.json5
pm2 start ecosystem.json5 --env production

pm2 delete ecosystem.json5---- it is the same as "pm2 delete all", it will stop all cluster,it will effect the users of my app

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cchan picture cchan  Â·  3Comments

mario-mui picture mario-mui  Â·  3Comments

rangercyh picture rangercyh  Â·  4Comments

lefam picture lefam  Â·  3Comments

getvega picture getvega  Â·  3Comments