Skip to content

Commit

Permalink
Log activerecord queries to log/$INTEGRAL_ENV.log.
Browse files Browse the repository at this point in the history
  • Loading branch information
gma committed Nov 11, 2008
1 parent de58978 commit 5b35783
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@ pkg
config/config.yml config/config.yml
config/database.yml config/database.yml
db/*sqlite3 db/*sqlite3
log/*.log
3 changes: 2 additions & 1 deletion lib/integral/database.rb
Expand Up @@ -4,7 +4,8 @@
module Integral module Integral
module Database module Database
def self.disable_logging def self.disable_logging
ActiveRecord::Base.logger = Logger.new("/dev/null") log_file = File.join(INTEGRAL_ROOT, "log", "#{INTEGRAL_ENV}.log")
ActiveRecord::Base.logger = Logger.new(log_file)
end end


def self.connect def self.connect
Expand Down

0 comments on commit 5b35783

Please sign in to comment.