Find particular string in Heroku logs

Viewed 6871

I am logging some errors by doing this in my Rails app:

logger.error "MY ERROR STRING"

How can I look in heroku logs to find that line?

I know how to do heroku logs --tail and heroku logs -n 500 ,but how can I find a specific string in the logs?

3 Answers

For a windows users,

heroku logs -n 100 -a appname | find "wordToFind"

you can change 100 to other number from 0 to 1500, that is the last 1500 logs from you heroku application

Related