Sha256: 0cfa40eb0a85e3af9b33e3c77f61f98bd86c79e89cbcfdc1a8c14fb7233c8f89

Contents?: true

Size: 607 Bytes

Versions: 1

Compression:

Stored size: 607 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?

      # Prevent broadcasting since SemanticLogger already supports multiple loggers
      if method_defined?(:broadcast)
        undef :broadcast
        def broadcast(logger)
          Module.new
        end
      end
    end

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_semantic_logger-4.13.0 lib/rails_semantic_logger/extensions/active_support/logger.rb