aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRichard Schneeman <richard.schneeman@gmail.com>2016-01-06 11:03:42 -0600
committerRichard Schneeman <richard.schneeman@gmail.com>2016-01-06 11:03:42 -0600
commitcc58837f64855a0d45106248da8154f22f6e5bbb (patch)
tree853cc0267d42486b0208014e9f7573aaf6bae349 /activerecord/lib
parent998b85ffe8997bb4da23f8ff65d3f4bb59e90a7e (diff)
parentb33a5ed67e9e9512d2fcbed507b19ff06ca8aa91 (diff)
downloadrails-cc58837f64855a0d45106248da8154f22f6e5bbb.tar.gz
rails-cc58837f64855a0d45106248da8154f22f6e5bbb.tar.bz2
rails-cc58837f64855a0d45106248da8154f22f6e5bbb.zip
Merge pull request #22933 from schneems/schneems/fix-broadcast
[close #22917] Don't output to `STDOUT` twice
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/railtie.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb
index f5e69ec4fb..17fbe5a742 100644
--- a/activerecord/lib/active_record/railtie.rb
+++ b/activerecord/lib/active_record/railtie.rb
@@ -57,8 +57,10 @@ module ActiveRecord
console do |app|
require "active_record/railties/console_sandbox" if app.sandbox?
require "active_record/base"
- console = ActiveSupport::Logger.new(STDERR)
- Rails.logger.extend ActiveSupport::Logger.broadcast console
+ unless ActiveSupport::Logger.logger_outputs_to?(Rails.logger, STDERR, STDOUT)
+ console = ActiveSupport::Logger.new(STDERR)
+ Rails.logger.extend ActiveSupport::Logger.broadcast console
+ end
end
runner do