Skip to content

Commit

Permalink
Resolve Rails 7.1 logger incompatibility
Browse files Browse the repository at this point in the history
Resolves #356
  • Loading branch information
zubin committed Oct 10, 2023
1 parent b410669 commit 4400f05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/racecar/rails_config_file_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ def self.load!
console = ActiveSupport::Logger.new($stdout)
console.formatter = Rails.logger.formatter
console.level = Rails.logger.level
Rails.logger.extend(ActiveSupport::Logger.broadcast(console))
if ::Rails::VERSION::STRING < "7.1"
Rails.logger.extend(ActiveSupport::Logger.broadcast(console))
else
Rails.logger = ActiveSupport::BroadcastLogger.new(Rails.logger, console)
end
end
end
end
Expand Down

0 comments on commit 4400f05

Please sign in to comment.