]> git.openstreetmap.org Git - rails.git/commitdiff
Limit log file size in development and test
authorTom Hughes <tom@compton.nu>
Fri, 27 Oct 2023 16:33:54 +0000 (17:33 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 27 Oct 2023 16:33:54 +0000 (17:33 +0100)
config/initializers/new_framework_defaults_7_1.rb

index 37024fa55bea30dc74728974e4c0ee7521930eff..c8d12c67eb5e4671f881a584c8ceae88bedb60b3 100644 (file)
@@ -127,9 +127,7 @@ Rails.application.config.active_support.use_message_serializer_for_metadata = tr
 # `config.load_defaults 7.1` does not set this value for environments other than
 # development and test.
 #
-# if Rails.env.local?
-#   Rails.application.config.log_file_size = 100 * 1024 * 1024
-# end
+Rails.application.config.log_file_size = 100 * 1024 * 1024 if %w[development test].include?(Rails.env)
 
 # Enable raising on assignment to attr_readonly attributes. The previous
 # behavior would allow assignment but silently not persist changes to the