Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Log activerecord queries to log/$INTEGRAL_ENV.log.

  • Loading branch information...
commit 5b35783800874c0a22a3b34993144bed089d2273 1 parent de58978
@gma authored
Showing with 3 additions and 1 deletion.
  1. +1 −0  .gitignore
  2. +2 −1  lib/integral/database.rb
View
1  .gitignore
@@ -4,3 +4,4 @@ pkg
config/config.yml
config/database.yml
db/*sqlite3
+log/*.log
View
3  lib/integral/database.rb
@@ -4,7 +4,8 @@
module Integral
module Database
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
def self.connect
Please sign in to comment.
Something went wrong with that request. Please try again.