From 222ab80557cfe3dac1b520bfc3a49f3b1bb88c55 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 14 Jun 2024 05:50:33 -0400 Subject: [PATCH] Fix `Style/GlobalStdStream` cop in environments/* files (#30694) --- config/environments/development.rb | 2 +- config/environments/production.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index cc601bde3..e4da60ac8 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -37,7 +37,7 @@ Rails.application.configure do config.action_controller.forgery_protection_origin_check = ENV['DISABLE_FORGERY_REQUEST_PROTECTION'].nil? - ActiveSupport::Logger.new(STDOUT).tap do |logger| + ActiveSupport::Logger.new($stdout).tap do |logger| logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) end diff --git a/config/environments/production.rb b/config/environments/production.rb index 6686a23d6..b42f78b14 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -94,7 +94,7 @@ Rails.application.configure do # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") # Log to STDOUT by default - config.logger = ActiveSupport::Logger.new(STDOUT) + config.logger = ActiveSupport::Logger.new($stdout) .tap { |logger| logger.formatter = ::Logger::Formatter.new } .then { |logger| ActiveSupport::TaggedLogging.new(logger) }