Skip to content
This repository
Browse code

restored logging to the log file and display on the console

  • Loading branch information...
commit 983bf6d456d29bfb9c8b497991e65682ca4d1ce4 1 parent 14d1029
Aaron Patterson authored January 20, 2012
4  activerecord/lib/active_record/railtie.rb
@@ -38,7 +38,9 @@ class Railtie < Rails::Railtie
38 38
     # first time. Also, make it output to STDERR.
39 39
     console do |app|
40 40
       require "active_record/railties/console_sandbox" if app.sandbox?
41  
-      ActiveRecord::Base.logger = ActiveSupport::Logger.new(STDERR)
  41
+      console = ActiveSupport::Logger.new(STDERR)
  42
+      logger = ActiveSupport::BroadcastLogger.new [Rails.logger, console]
  43
+      ActiveRecord::Base.logger = logger
42 44
     end
43 45
 
44 46
     initializer "active_record.initialize_timezone" do

0 notes on commit 983bf6d

Please sign in to comment.
Something went wrong with that request. Please try again.