Is there a way to tell pm2 to leave stderr and stdout alone (as opposed to writing to files)?
I'm using pm2 on Heroku using this gist as my model. Everything seems to work perfectly except that I've lost any ability to log from within my app. They don't show up in the Heroku logs and the files that pm2 creates aren't accessible to me on Heroku's file system (or I can't find them).
In your package.json:
"scripts": {
"preinstall": "npm i -g pm2 && pm2 install pm2-logrotate"
}
In your Procfile:
web: pm2 start app.js && pm2 logs all
We just created the official PM2 documentation, here is how to integrate PM2 with Heroku while printing the logs:
http://pm2.keymetrics.io/docs/usage/use-pm2-with-cloud-providers/#heroku-google-app-engine-azure
Alex
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With