instance method silence

Ruby on Rails 8.1.2

Since v6.0.6

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

silence(severity = Logger::ERROR)

Silences the logger for the duration of the block.

Parameters

severity opt = Logger::ERROR
Source
# File activesupport/lib/active_support/logger_silence.rb, line 17
    def silence(severity = Logger::ERROR)
      silencer ? log_at(severity) { yield self } : yield(self)
    end

Defined in activesupport/lib/active_support/logger_silence.rb line 17 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::LoggerSilence

Type at least 2 characters to search.

↑↓ navigate · open · esc close