Sha256: 0cdcd1d8d9dc05ab7753b7d2dc599757882bf5c609e15c62a0600b81decb29c9

Contents?: true

Size: 501 Bytes

Versions: 26

Compression:

Stored size: 501 Bytes

Contents

# This adds a #formatter and #formatter= method to the legacy ActiveSupport::BufferedLogger
# class. This bug was never resolved due to it being phased out past Rails >= 4.

begin
  require "active_support/buffered_logger"

  class ActiveSupport::BufferedLogger
    def formatter
      if @log.respond_to?(:formatter)
        @log.formatter
      end
    end

    def formatter=(value)
      if @log.respond_to?(:formatter=)
        @log.formatter = value
      end
    end
  end

rescue Exception
end

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
logtail-rails-0.2.8 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.2.7 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.2.6 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.2.5 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.2.4 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.2.3 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.2.2 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.2.1 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.1.8 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.1.7 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.1.6 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.1.5 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.1.4 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.1.3 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.1.2 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.1.1 lib/logtail-rails/overrides/active_support_buffered_logger.rb
logtail-rails-0.1.0 lib/logtail-rails/overrides/active_support_buffered_logger.rb
timber-rails-1.0.1 lib/timber-rails/overrides/active_support_buffered_logger.rb
timber-rails-1.0.0 lib/timber-rails/overrides/active_support_buffered_logger.rb
timber-2.6.2 lib/timber/overrides/active_support_buffered_logger.rb