开发者

Rails / Capistrano - How to set a staging server to show development logs in DB

In my development logs, i get information like SQL statements made, etc.

However, when i deploy to a staging se开发者_StackOverflowrver, i do not get that in my development logs

How do i configure capistrano/rails to get that?

NOTE: I need it to be running in production env (database access, etc)


You can explicitly set the logging level in you config:

ActiveRecord::Base.logger.level = Logger::DEBUG

I would actually setup an environment specifically for staging. Create a staging.rb file in environment (using the above logger setting and a copy of the rest of production config), create an entry in database.yml and then start the server with a RAILS_ENV=staging flag.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜