问题
I am getting an error only in production and to debug that, I would like to enable full backtracing in production.
I already have config.log_level = :debug
in config/environments/production.rb
, but that does not give me a backtrace, only logs the queries, requests and and served assets in detail.
回答1:
To show backtraces in the production environment, set config.consider_all_requests_local = true
in config/environments/production.rb
. It's not good practice to leave this turned on, however it can be useful when provisioning a new production environment.
来源:https://stackoverflow.com/questions/10516190/enable-full-backtrace-logging-in-production