Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku page displays an error while "heroku logs" do not

My Heroku-hosted Rails site is showing that an error has occurred, but when I run heroku logs no error is listed. It does show the action that is causing the error but it lists it the same way it does every other successful action.

This is the first time heroku logs hasn't displayed the errors for this site. Has anyone had this problem before and found a solution?

like image 584
Mat Newman Avatar asked Jul 20 '11 18:07

Mat Newman


2 Answers

For Rails 4, add rails_12factor gem to your Gemfile in order to get detailed logs of your application. Additionally it fixes some other weired problems about Heroku too.

Add this to your Gemfile:

gem 'rails_12factor'

like image 120
scaryguy Avatar answered Oct 15 '22 15:10

scaryguy


I've noticed this too. Heroku has several logging levels. You should try this:

heroku config:add LOG_LEVEL=DEBUG
heroku addons:upgrade logging:expanded

Then go to your app and get ready to hit the page with an error. But before you do do this:

heroku logs --tail

And you should be able to see the errors in you console.

like image 28
thenengah Avatar answered Oct 15 '22 14:10

thenengah