Viewing Heroku logs

Posted on 15-02-2013 23:26 by graham
This tutorial shortly describes how you can view some or all logs for your Heroku application.

The heroku logs command

Heroku's command line utility has a switch called logs that allows you to view the logs of your app. Just typing:
heroku logs

will do the work. By default 100 most recent lines from your logs will be displayed.

If you want to display a certain number of lines from the logs, use the -n switch:
heroku logs -n 1000

This will display 1000 most recent log lines.

You can display 1500 lines at most - it is a restriction imposed by Heroku

If you want to tail your logs live, use the -t switch:
heroku logs -t

This will make the logs appear on your console as they are generated by the application.


Add comment

Has this tutorial been helpful to you? Or do you see anything wrong? We appreciate your opinion!
Your comment:
Show formatting hints
HTML is disallowed, but in your text you can use the following markup
  • [code][/code] for a block of code
  • [tt][/tt] for inline code
  • [link]link href|link anchor[/link] for links
  • [b][/b] for bold text
+ Ask a question
If you have a technical question related to programming and computers, ask it here. Other users will help you solve it!
Unanswered questions
Share your knowledge by helping others solve their problems