diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG.md | 7 | ||||
-rw-r--r-- | railties/lib/rails/application/bootstrap.rb | 6 | ||||
-rw-r--r-- | railties/test/application/configuration_test.rb | 15 |
3 files changed, 2 insertions, 26 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index bade9ef543..bb3cc1760e 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -25,13 +25,6 @@ *Cristian Mircea Messel*, *Chulki Lee* -* Only lookup `config.log_level` for stdlib `::Logger` instances. - Assign it as is for third party loggers like `Log4r::Logger`. - - Fixes #13421. - - *Yves Senn* - * The `Gemfile` of new applications depends on SDoc ~> 0.4.0. *Xavier Noria* diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb index 33bcab1e57..a26d41c0cf 100644 --- a/railties/lib/rails/application/bootstrap.rb +++ b/railties/lib/rails/application/bootstrap.rb @@ -53,11 +53,7 @@ INFO logger end - if ::Logger === Rails.logger - Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase) - else - Rails.logger.level = config.log_level - end + Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase) end # Initialize cache early in the stack so railties can make use of it. diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index b2d0e7e202..b39cd3747b 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -762,7 +762,7 @@ module ApplicationTests end end - test "lookup config.log_level with custom logger (stdlib Logger)" do + test "config.log_level with custom logger" do make_basic_app do |app| app.config.logger = Logger.new(STDOUT) app.config.log_level = :info @@ -770,19 +770,6 @@ module ApplicationTests assert_equal Logger::INFO, Rails.logger.level end - test "assign log_level as is with custom logger (third party logger)" do - logger_class = Class.new do - attr_accessor :level - end - logger_instance = logger_class.new - make_basic_app do |app| - app.config.logger = logger_instance - app.config.log_level = :info - end - assert_equal logger_instance, Rails.logger - assert_equal :info, Rails.logger.level - end - test "respond_to? accepts include_private" do make_basic_app |