Sha256: c5ee4c32b651d8da8f52f0368f3423a93df30e73cb062a2d10435cdc39175af5

Contents?: true

Size: 538 Bytes

Versions: 6

Compression:

Stored size: 538 Bytes

Contents

require "active_support/logger"

module ActiveSupport
  # More hacks to try and stop Rails from being it's own worst enemy.
  class Logger
    class << self
      undef :logger_outputs_to?, :broadcast
    end

    # Prevent Console from trying to merge loggers
    def self.logger_outputs_to?(*args)
      true
    end

    # Prevent broadcasting since SemanticLogger already supports multiple loggers
    def self.broadcast(logger)
      Module.new
    end

    def self.new(*args, **kwargs)
      SemanticLogger[self]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_semantic_logger-4.12.0 lib/rails_semantic_logger/extensions/active_support/logger.rb
rails_semantic_logger-4.11.0 lib/rails_semantic_logger/extensions/active_support/logger.rb
rails_semantic_logger-4.10.0 lib/rails_semantic_logger/extensions/active_support/logger.rb
rails_semantic_logger-4.9.0 lib/rails_semantic_logger/extensions/active_support/logger.rb
rails_semantic_logger-4.6.2 lib/rails_semantic_logger/extensions/active_support/logger.rb
rails_semantic_logger-4.6.1 lib/rails_semantic_logger/extensions/active_support/logger.rb