diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 6e31fb0ea9..aca01f216b 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -43,7 +43,7 @@ module Rails @session_store = nil @time_zone = "UTC" @beginning_of_week = :monday - @log_level = :info + @log_level = :debug @generators = app_generators @cache_store = [ :file_store, "#{root}/tmp/cache/" ] @railties_order = [:all] diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 5c91f480f2..679706dea6 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -1577,8 +1577,15 @@ module ApplicationTests assert_equal session_options, app.config.session_options end - test "config.log_level defaults to info" do - make_basic_app + test "config.log_level defaults to debug in development" do + app "development" + + assert_equal Logger::DEBUG, Rails.logger.level + end + + test "config.log_level default to info in production" do + app "production" + assert_equal Logger::INFO, Rails.logger.level end diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 8513f3690d..6925c95f71 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -206,7 +206,6 @@ module TestHelpers config.session_store :cookie_store, key: "_myapp_session" config.active_support.deprecation = :log config.action_controller.allow_forgery_protection = false - config.log_level = :info RUBY end