From d31c941413ed484762ec819de8f35d413d84a9d6 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 11 Mar 2015 15:06:42 -0700 Subject: [PATCH] Revert "Merge pull request #15476 from JacobEvelyn/master" This introduces undesirable `Rails.logger` formatters (such as the syslog formatter) onto a `Logger.new(STDERR)` for the console. The production logger may be going elsewhere than standard io, so we can't presume to reuse its formatter. With syslog, this causes missing newlines in the console, so irb prompts start at the end of the last log message. We can work to expose the console formatter in another way to address the original issue. This reverts commit 026ce5ddf11c4cda0aae7f33a9266e54117db318, reversing changes made to 6f0a69c5899ebdc892e2aa23e68e2604fa70fb73. --- activerecord/lib/active_record/railtie.rb | 3 --- railties/CHANGELOG.md | 7 ------- 2 files changed, 10 deletions(-) diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index b6de90e89d..f1bdbc845c 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -58,9 +58,6 @@ module ActiveRecord require "active_record/railties/console_sandbox" if app.sandbox? require "active_record/base" console = ActiveSupport::Logger.new(STDERR) - console.formatter = Rails.logger.formatter - console.level = Rails.logger.level - Rails.logger.extend ActiveSupport::Logger.broadcast console end diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 8b10144413..cb85401920 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -5,13 +5,6 @@ *Hyonjee Joo* -* Set Rails console to use log formatter and log level as specified for the - given environment. - - Fixes #15470. - - *Jacob Evelyn* - * Add `config/initializers/active_record_belongs_to_required_by_default.rb` Newly generated Rails apps have a new initializer called