views:

167

answers:

1

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

However, when i deploy to a staging server, 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)

+1  A: 

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.

Toby Hede
hmmm, where do i set this if i only want it to happen for the staging server? There are several configuration files i see
ming yeow
added some more detail to my response :p
Toby Hede
thanks a lot for the great answer! "RAILS_ENV=staging flag" -> i guess i can set this in staging.rb as well. thanks and accepted! =)
ming yeow