1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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 026ce5ddf1, reversing
changes made to 6f0a69c589.
This commit is contained in:
Jeremy Kemper 2015-03-11 15:06:42 -07:00
parent 1b7ae86f26
commit d31c941413
2 changed files with 0 additions and 10 deletions

View file

@ -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

View file

@ -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