Sha256: 645889eb38c6e1b366460eb703e99f8334663469925ae4f358cc82e18664657e

Contents?: true

Size: 875 Bytes

Versions: 7

Compression:

Stored size: 875 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 +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

7 entries across 7 versions & 2 rubygems

Version Path
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/gems/logging-1.8.1/lib/logging/rails_compat.rb
logging-1.8.1 lib/logging/rails_compat.rb
logging-1.8.0 lib/logging/rails_compat.rb
logging-1.7.2 lib/logging/rails_compat.rb
logging-1.7.1 lib/logging/rails_compat.rb
logging-1.7.0 lib/logging/rails_compat.rb
logging-1.6.2 lib/logging/rails_compat.rb