I have a small app on heroku. Whenever I want to see the logs I go to the command line and do
heroku logs
That only shows me about 100 lines. Is there not a way to see complete logs for our application on heroku?
Click on the Windows Start Button. Right-click on Computer and select Manage. In the Computer Management dialog, expand System Tools | Event Viewer | Windows Logs. Select Application Log.
Simply use heroku logs to display the last 100 lines of your logs. Heroku only saves the last 1500 lines of logs, which you can access using heroku logs -n 1500 . If you want more logging, check out Heroku add-ons like Logentries or Papertrail. Save this answer.
Currently, there is no way to clear the Heroku logs. Heroku maintains a record of the past 1500 lines of log activity.
Update (thanks to dawmail333):
heroku logs -n 1500
or, to tail the logs live
heroku logs -t
Heroku log documentation
If you need more than a few thousand lines you can Use heroku's Syslog Drains
Alternatively (old method):
$ heroku run rails c File.open('log/production.log', 'r').each_line { |line| puts line }
Logging has greatly improved in heroku!
$ heroku logs -n 500
Better!
$ heroku logs --tail
references: http://devcenter.heroku.com/articles/logging
UPDATED
These are no longer add-ons, but part of the default functionality :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With