steel
steel

Reputation: 12520

Retrieve Heroku Logs for Specific Remote

I have a Rails 4 app that I push to Heroku from Git. I have a staging remote and a production remote on Heroku. When I run:

$ heroku logs

I get the staging logs. How can I get the production logs?

$ git remote -v
origin some/github/path (fetch)
origin some/github/path (push)
staging [email protected]:some-heroku-app.git (fetch)
staging [email protected]:some-heroku-app.git (push)
production [email protected]:some-other-heroku-app.git (fetch)
production [email protected]:some-other-heroku-app.git (push)

Attempts include:

$ heroku logs -s staging

Upvotes: 1

Views: 175

Answers (2)

Andrew Gorcester
Andrew Gorcester

Reputation: 19973

Replace -s with -r. heroku logs -r staging (or production or whatever).

Upvotes: 2

infused
infused

Reputation: 24337

Use the Heroku app name

heroku logs --app my-production-app

Upvotes: 2

Related Questions