Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku debugging

I am building an application with Heroku and having some problems. I want to debug some content like I do with rails server:

logger.debug '...'

How can I do that in Heroku, so I can see the debugging in heroku logs? (or anything else..)

Thanks!

like image 203
AdamGold Avatar asked May 13 '11 15:05

AdamGold


People also ask

How do I debug a heroku app?

If running heroku local does not help, run a remote shell: heroku run -a <your app name> /bin/bash , and there run npm start to see the logs and debug the issue on the Heroku server.

How can I see heroku errors?

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.

How do I view heroku logs?

You can view logs with the Heroku CLI, the dashboard, your logging add-on, or in your log drain. You can't view logs for apps in Shield spaces with Private Space Logging enabled. Retrieve logs from your log drain instead.

How can I see heroku deployed files?

Terminal access is now provided by clicking a link "More" on the top right of the Heroku dashboard where you can select "run console". This presents an option to run terminal commands and shows a default of 'bash'. However, you do have to explicitly enter 'bash' or other command.


1 Answers

Details here: http://devcenter.heroku.com/articles/logging

Also make sure you set the right Logging level for your Rails app: http://blog.sethladd.com/2005/11/adjust-log-level-in-ruby-on-rails.html

like image 78
Tam Avatar answered Oct 04 '22 05:10

Tam