To fetch your logs, use the heroku logs
command.
$ heroku logs
The logs command retrieves 100 log lines by default. You can specify the number of log lines to retrieve (up to a maximum of 1,500 lines) by using the --num
(or -n
) option.
$ heroku logs -n 200
Similar to tail -f
, real-time tail displays recent logs and leaves the session open for real-time logs to stream in. By viewing a live stream of logs from your app, you can gain insight into the behavior of your live application and debug current problems.
You can tail your logs using --tail
(or -t
).
$ heroku logs --tail
When you are done, press Ctrl+C to return to the prompt.