Sha256: ea2ecf2cec65e56c778c13eb16b38d377be62d1e05122c525da73fb50760a353

Contents?: true

Size: 673 Bytes

Versions: 2

Compression:

Stored size: 673 Bytes

Contents

# frozen_string_literal: true

module ActiveSupport
  # Extracted from:
  # https://github.com/rails/rails/blob/8d1ade40dd08feb26240ba6ef7e4bed91f70864a/activesupport/lib/active_support/logger_silence.rb
  # Compare SHA with latest commit to check for changes:
  # https://github.com/rails/rails/blob/main/activesupport/lib/active_support/logger_silence.rb
  # This module only contains the instance methods from LoggerSilence
  module AltLoggerSilencePart2
    extend ActiveSupport::Concern

    # Silences the logger for the duration of the block.
    def silence(severity = Logger::ERROR)
      silencer ? log_at(severity) { yield self } : yield(self)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activesupport-logger-1.0.1 lib/activesupport/alt_logger_silence_part2.rb
activesupport-logger-1.0.0 lib/activesupport/alt_logegr_silence_part2.rb