0
out_file: "/dev/null",
error_file: "/dev/null"

I want to disable PM2 logs stroe in my local machine and on the server too,

I tried to put this in package.json file after "script : {}" key,but it didn't work for me?

  • Does this answer your question? [Disable pm2 log creation in node js](https://stackoverflow.com/questions/37745073/disable-pm2-log-creation-in-node-js) – Mukesh Singh Thakur Jul 12 '23 at 07:18
  • I do not know where I can put that script, As I do not have ecosystem.js file in my node js project – Sagar Jadav Jul 12 '23 at 07:20
  • When you run the start command on the server, that time add that as parameters. `pm2 stop ` and `pm2 start -o "/dev/null" -e "/dev/null"` – Mukesh Singh Thakur Jul 12 '23 at 07:24
  • @MukeshSinghThakur Thank you! Your suggested solution is working for me – Sagar Jadav Jul 12 '23 at 13:23
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 13 '23 at 16:05

0 Answers0