Module: ActiveSupport::LoggerSilence
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Concern
|
|
Defined in: | activesupport/lib/active_support/logger_silence.rb |
Class Method Summary
Concern
- Extended
class_methods | Define class methods from given block. |
included | Evaluate given block in context of base class, so that you can write class macros here. |
prepended | Evaluate given block in context of base class, so that you can write class macros here. |
append_features, prepend_features |
Instance Method Summary
-
#silence(severity = Logger::ERROR)
Silences the logger for the duration of the block.
DSL Calls
included
[ GitHub ]11 12 13 14
# File 'activesupport/lib/active_support/logger_silence.rb', line 11
included do cattr_accessor :silencer, default: true include ActiveSupport::LoggerThreadSafeLevel end
Instance Method Details
#silence(severity = Logger::ERROR)
Silences the logger for the duration of the block.
# File 'activesupport/lib/active_support/logger_silence.rb', line 17
def silence(severity = Logger::ERROR) silencer ? log_at(severity) { yield self } : yield(self) end