Change railties default log_level to :error

The default of :info generates a ton of unnecessary noise in the railties logs.
This commit is contained in:
zzak 2023-10-18 07:49:28 +09:00
parent 1d8d8e128d
commit 6c7a0e891c
No known key found for this signature in database
GPG Key ID: 213927DFCF4FF102
2 changed files with 3 additions and 1 deletions

View File

@ -89,6 +89,7 @@ module ApplicationTests
def restore_default_config
FileUtils.rm_rf("#{app_path}/config/environments")
FileUtils.mv("#{app_path}/config/__environments__", "#{app_path}/config/environments")
remove_from_env_config "production", "config.log_level = :error"
end
test "Rails.env does not set the RAILS_ENV environment variable which would leak out into rake tasks" do

View File

@ -145,6 +145,7 @@ module TestHelpers
add_to_env_config :development, "config.action_view.annotate_rendered_view_with_filenames = false"
remove_from_env_config("development", "config.generators.apply_rubocop_autocorrect_after_generate!")
add_to_env_config :production, "config.log_level = :error"
end
def teardown_app
@ -262,7 +263,7 @@ module TestHelpers
@app.config.eager_load = false
@app.config.session_store :cookie_store, key: "_myapp_session"
@app.config.active_support.deprecation = :log
@app.config.log_level = :info
@app.config.log_level = :error
@app.config.secret_key_base = "b3c631c314c0bbca50c1b2843150fe33"
yield @app if block_given?