Sha256: 55b3a1722637157de1a7b0e9267718ccacdfc4ad8e4dc44446b43e7a2c0cc5ea

Contents?: true

Size: 955 Bytes

Versions: 15

Compression:

Stored size: 955 Bytes

Contents

if defined? ActiveSupport

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 detail
    # discussion of the issue.
    #
    def silence( *args )
      yield self
    end

  end  # RailsCompat

  Logger.send :include, RailsCompat

end  # Logging
end  # if defined?

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/logging-2.1.0/lib/logging/rails_compat.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/logging-2.1.0/lib/logging/rails_compat.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/logging-2.1.0/lib/logging/rails_compat.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/logging-2.1.0/lib/logging/rails_compat.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/logging-2.1.0/lib/logging/rails_compat.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/logging-2.1.0/lib/logging/rails_compat.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/logging-2.1.0/lib/logging/rails_compat.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/logging-2.1.0/lib/logging/rails_compat.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/logging-2.1.0/lib/logging/rails_compat.rb
logging-2.1.0 lib/logging/rails_compat.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/logging-1.8.2/lib/logging/rails_compat.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/logging-1.8.2/lib/logging/rails_compat.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/logging-1.8.2/lib/logging/rails_compat.rb
logging-2.0.0 lib/logging/rails_compat.rb
logging-1.8.2 lib/logging/rails_compat.rb