diff options
author | Richard Schneeman <richard.schneeman@gmail.com> | 2016-01-06 11:03:42 -0600 |
---|---|---|
committer | Richard Schneeman <richard.schneeman@gmail.com> | 2016-01-06 11:03:42 -0600 |
commit | cc58837f64855a0d45106248da8154f22f6e5bbb (patch) | |
tree | 853cc0267d42486b0208014e9f7573aaf6bae349 /railties | |
parent | 998b85ffe8997bb4da23f8ff65d3f4bb59e90a7e (diff) | |
parent | b33a5ed67e9e9512d2fcbed507b19ff06ca8aa91 (diff) | |
download | rails-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 'railties')
-rw-r--r-- | railties/lib/rails/commands/server.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb index d3ea441f8e..45d649ec31 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -133,11 +133,13 @@ module Rails def log_to_stdout wrapped_app # touch the app so the logger is set up - console = ActiveSupport::Logger.new($stdout) + console = ActiveSupport::Logger.new(STDOUT) console.formatter = Rails.logger.formatter console.level = Rails.logger.level - Rails.logger.extend(ActiveSupport::Logger.broadcast(console)) + unless ActiveSupport::Logger.logger_outputs_to?(Rails.logger, STDOUT) + Rails.logger.extend(ActiveSupport::Logger.broadcast(console)) + end end end end |