Sha256: b2546853c57cec09d7d9146a74f63a8306abcfd561d6f5e7ee8d5bcd2ebfe5f5

Contents?: true

Size: 871 Bytes

Versions: 41

Compression:

Stored size: 871 Bytes

Contents

module Logging

  # Rails compatibility module.
  #
  # The ActiveSupport gem adds a few methods to the default Ruby logger, and
  # some Rails extensions expect these methods to exist. Those methods are
  # implemented in this module and included in the Logging::Logger class when
  # the ActiveSupport gem is present.
  module RailsCompat

    # A no-op implementation of the `formatter` method.
    def formatter; end

    # A no-op implementation of the +silence+ method. Setting of log levels
    # should be done during the Logging configuration. It is the author's
    # opinion that overriding the log level programmatically is a logical
    # error.
    #
    # Please see https://github.com/TwP/logging/issues/11 for a more detailed
    # discussion of the issue.
    def silence( *args )
      yield self
    end
  end

  Logger.send :include, RailsCompat
end

Version data entries

41 entries across 33 versions & 3 rubygems

Version Path
logging-2.3.1 lib/logging/rails_compat.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/logging-2.3.0/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/logging-2.3.0/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/logging-2.3.0/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/logging-2.3.0/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/logging-2.3.0/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/logging-2.3.0/lib/logging/rails_compat.rb
logging-2.3.0 lib/logging/rails_compat.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/logging-2.2.2/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/logging-2.2.2/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/logging-2.2.2/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/logging-2.2.2/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/logging-2.2.2/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/logging-2.2.2/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/logging-2.2.2/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/logging-2.2.2/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/logging-2.2.2/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/logging-2.2.2/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/logging-2.2.2/lib/logging/rails_compat.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/logging-2.2.2/lib/logging/rails_compat.rb