diff options
Diffstat (limited to 'activerecord/lib/active_record/railtie.rb')
-rw-r--r-- | activerecord/lib/active_record/railtie.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index b1c8ae5b77..71b91412a3 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -38,7 +38,9 @@ module ActiveRecord # first time. Also, make it output to STDERR. console do |app| require "active_record/railties/console_sandbox" if app.sandbox? - ActiveRecord::Base.logger = ActiveSupport::Logger.new(STDERR) + console = ActiveSupport::Logger.new(STDERR) + logger = ActiveSupport::BroadcastLogger.new [Rails.logger, console] + ActiveRecord::Base.logger = logger end initializer "active_record.initialize_timezone" do |