Make pm2 log to console

前端 未结 4 1002
滥情空心
滥情空心 2020-12-30 20:44

I am running a node webserver using pm2. Since pm2 spawns another process and redirects stdout and stderr to files, I have to look somewhere else for the logs. Ideally, I wo

4条回答
  •  醉梦人生
    2020-12-30 21:20

    Found the answer (their documentation is not that great), just added the --no-daemon flag, seems to have done it. Although, it appears that it's still logging to the file (even when using the flag) on the first uptime. Once the process gets restarted (I'm watching for file changes) it starts logging out to the console

提交回复
热议问题