new(logger) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/tagged_logging.rb, line 116
    def self.new(logger)
      logger = logger.clone

      if logger.formatter
        logger.formatter = logger.formatter.clone

        # Workaround for https://bugs.ruby-lang.org/issues/20250
        # Can be removed when Ruby 3.4 is the least supported version.
        logger.formatter.object_id if logger.formatter.is_a?(Proc)
      else
        # Ensure we set a default formatter so we aren't extending nil!
        logger.formatter = ActiveSupport::Logger::SimpleFormatter.new
      end

      logger.formatter.extend Formatter
      logger.extend(self)
    end
Register or log in to add new notes.