Skip to content

Instantly share code, notes, and snippets.

@romanbsd
Created November 12, 2024 08:35
Show Gist options
  • Save romanbsd/08093fe0ddb722ef5656cfe2eb87d593 to your computer and use it in GitHub Desktop.
Save romanbsd/08093fe0ddb722ef5656cfe2eb87d593 to your computer and use it in GitHub Desktop.
# Shim for Rails 6.1 to ease upgrading to 7.1
return if defined? ActiveSupport::BroadcastLogger
module ActiveSupport
class BroadcastLogger < SimpleDelegator
def initialize(*loggers)
logger = loggers.shift
super(logger)
loggers.each { |l| logger.extend(ActiveSupport::Logger.broadcast(l)) }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment