fix: Log config env variable typecasting (#1792)
This commit is contained in:
@@ -76,8 +76,8 @@ Rails.application.configure do
|
||||
# Use a different logger for distributed setups.
|
||||
# require 'syslog/logger'
|
||||
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
||||
|
||||
if ENV['RAILS_LOG_TO_STDOUT'].present?
|
||||
|
||||
if ActiveModel::Type::Boolean.new.cast(ENV.fetch('RAILS_LOG_TO_STDOUT', true))
|
||||
logger = ActiveSupport::Logger.new($stdout)
|
||||
logger.formatter = config.log_formatter
|
||||
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
||||
|
||||
Reference in New Issue
Block a user