I have been trying to get the debug module to work within the logs on production. I am seeing problems and need to dig deep to why.
What am I doing wrong?
PM2_DEBUG=true pm2 start --node-args="DEBUG='*'" --env="DEBUG='*'" start.js
Hello,
DEBUG='*' pm2 start start.js
DEBUG='*' pm2 restart start.js
I'm sorry to say I'm still having this problem.
I start the app with
DEBUG='*' pm2 restart 1
The app with id 1 restarts but I only see the DEBUG messages of pm2 and not from my app.
I'm at latest pm2 v2.6.1
@tkalfigo You need to add --update-env option to tell PM2 to pickup new environment and inject it into the new process
@vmarchaud Worked like a charm! You saved the day. Thanks! :)
Most helpful comment
@tkalfigo You need to add
--update-envoption to tell PM2 to pickup new environment and inject it into the new process