Make pm2 log to console

前端 未结 4 1039
滥情空心
滥情空心 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:16

    you can easily achieve that by starting another terminal/console and run this command

     pm2 log
     // logs everything to the terminal except console.log
    
     pm2 logs
     // logs everything to the terminal even console.log
    

提交回复
热议问题