Unitech / pm2

Node.js Production Process Manager with a built-in Load Balancer.
https://pm2.keymetrics.io/docs/usage/quick-start/
Other
41.03k stars 2.59k forks source link

Question regarding logging :question: #5785

Open supertick opened 3 months ago

supertick commented 3 months ago

Hello ! First of course, I want to thank all the maintainers for this great project. :bow:

I have an Electron/Express app which needs to manage sub processes. PM2 has been working great, but I'm wondering about how to stream stdout/stderr and stdin. As far as I can tell, the strategy is to log to file for stdout?

Is there another common library or way to watch and stream those logs back ? I can't seem to find anything in the JS API docs, although there seems to be ability to do advanced signaling, I'm still wondering how to handle standard input and output.

Regards.

ultimate-tester commented 3 months ago

So PM2 takes stdout and stderr and stores them in corresponding log files. Can you explain your use case better so me and others can give you some suggestions?