Rails - See generated SQL queries in Log files

旧时模样 提交于 2019-12-23 09:36:36

问题


Is there a way to see all generated queries from rails in production environment like you can in development?


回答1:


Yes you can. If you go in the config/environments/production.rb file, there's a section like this:

# See everything in the log (default is :info)
# config.log_level = :debug

Uncomment the config.log_level line, and you'll get the same log in production as you would in dev.



来源:https://stackoverflow.com/questions/3852832/rails-see-generated-sql-queries-in-log-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!