Reduce test logging by default

These logs are rarely checked, and can take up a lot of disk space.

I wanted to reduce the dev log level too, but then realised it also affects the dev server stdout. So now the other suggestions seem like a good idea.. (eg link development.log to /dev/null)

Oh well, this change will at least reduce one source of unnecessary disk usage in a default installation, so I think worth doing.
This commit is contained in:
David Cook
2025-10-14 12:19:11 +11:00
parent 0a385cc67c
commit bd58969fb5
2 changed files with 4 additions and 2 deletions

View File

@@ -27,6 +27,8 @@ Rails.application.configure do
# To override this, set the appropriate locale in .env[.*] file.
config.time_zone = ENV.fetch("TIMEZONE", "UTC")
# Log level for dev server stdout and development.log file.
# Set the desired level in .env.development.local file.
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", :debug)
# Enable/disable caching. By default caching is disabled.

View File

@@ -66,8 +66,8 @@ Rails.application.configure do
# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []
# Change to reduce unecessary logging
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", :debug)
# Reduced logging by default; set the desired level in .env.test.local file.
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", :fatal)
# Fail tests on deprecated code unless it's a known case to solve.
Rails.application.deprecators.behavior = ->(message, callstack, deprecator) do