custom logging under pm2

前端 未结 4 2355
没有蜡笔的小新
没有蜡笔的小新 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:44

    One nifty feature is to use the logs feature in terminal:

    pm2 logs [--raw]
    

    this will live stream the all the logs. Other handy commands are:

    • pm2 flush
    • pm2 reloadLogs

提交回复
热议问题