Skip to content

Instantly share code, notes, and snippets.

@Unitech
Last active February 9, 2018 15:22
  • Star 24 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Unitech/4c8ea564aa8bf0a389c5 to your computer and use it in GitHub Desktop.
PM2 / Keymetrics for Heroku/Rackspace/Joyent/Amazon Elasticbeanstalk/Azure...
http://pm2.keymetrics.io/docs/usage/use-pm2-with-cloud-providers/
@uooq
Copy link

uooq commented Aug 20, 2015

This works like a charm except it seems to hijack all of the application logs. Anything written to stderr or stdout in my app is redirected by pm2 to a file system path but either that writing isn't actually happening in heroku or it's not available to the user via the ephemeral file system.

Is there a way to tell pm2 to not pipe the stdout/stderr to files?

@Unitech
Copy link
Author

Unitech commented Aug 22, 2015

The log thing is now fixed, this file will output error and output logs from any application in the standard output (https://gist.github.com/Unitech/4c8ea564aa8bf0a389c5#file-bootstrap-js-L28)

@uooq
Copy link

uooq commented Aug 22, 2015

That works, thanks! Minor tweak-- on line #35 you meant 'log:err' and (optionally) on #36 I'm writing to console.error instead of console.log.

@Unitech
Copy link
Author

Unitech commented Aug 26, 2015

Thanks :))

@Freundschaft
Copy link

I cant get this to work on azure, everything looks alright but I cannot reach the pm2 workers and I dont see the process popping up at keymetrics :(

Anyone got experience getting this to work on a azure web app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment