如何在生产模式下启用数据库日志记录?(Rails v2.3.8)

chr*_*ris 5 logging ruby-on-rails

我只在生产服务器上有一些奇怪的东西,我需要能够在开发模式下看到所有数据库查询.

我确信这是一个小配置调整,但我找不到任何解决方案.

edm*_*dmz 4

在 Rails 2.x 中,environment.rb 文件中包含:

  # Force all environments to use the same logger level
  # (by default production uses :info, the others :debug)
  # config.log_level = :debug
Run Code Online (Sandbox Code Playgroud)

Rails 3.x 中应该有类似的东西。