samedi 25 avril 2015

Logging exceptions to log file in Ruby on Rails


I'm using log4jRuby to log the errors in my Rails application. Normally in development, any exceptions raised in the application will be directly displayed on the page. In production I set config.consider_all_requests_local = true in my enviorments/production.rb file. So that the users wont see any ugly exceptions. The page only shows a 500 server error when an exception occurs in production. I except the logs for the exception to be shown in my log files, but it doesn't. Now it's becoming difficult to know the reason why an exception occurred on production. Is there any other configuration that I'd have to set to achieve the same?

Rails 4.0.3 version.


Aucun commentaire:

Enregistrer un commentaire