custom logging under pm2

前端 未结 4 2442
没有蜡笔的小新
没有蜡笔的小新 2021-02-20 14:32

I have some useful logging in my node app that I write to console.log

node server.js >> /var/log/nodeserver.log 2>&1

4条回答
  •  忘掉有多难
    2021-02-20 14:35

    In case of new start, you just:

    • run pm2 start/reload ecosystem.config.js [--only your_app]

    But when it is already started (pm2 already managing it) you have to do (someone can find a better way, but this works for me):

    • run pm2 delete your_app
    • run pm2 start

提交回复
热议问题