如何在生产模式下启用数据库日志记录? (Rails v2.3.8) [英] How do you enable database logging in production mode? (Rails v2.3.8)
本文介绍了如何在生产模式下启用数据库日志记录? (Rails v2.3.8)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的生产服务器上只有一些奇怪之处,我需要能够像在开发模式下一样查看所有数据库查询.
I have some oddities on my production server only and I need to be able to see all the database queries as in development mode.
我确定这是一个小的配置调整,但是找不到任何解决方案.
I am sure it is a small config tweak, but I can't find any solutions.
推荐答案
在Rails 2.x中,在environment.rb文件中,您具有:
In Rails 2.x, in the environment.rb file you have:
# Force all environments to use the same logger level
# (by default production uses :info, the others :debug)
# config.log_level = :debug
在Rails 3.x中应该类似.
In Rails 3.x should be something similar.
这篇关于如何在生产模式下启用数据库日志记录? (Rails v2.3.8)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文