Class: Hubbado::Log::Display
- Inherits:
-
Object
- Object
- Hubbado::Log::Display
- Defined in:
- lib/hubbado/log/display.rb
Overview
Whether the operator asked to be shown a message. A handler that prints asks this; one that reports an incident does not, so narrowing a log cannot silence a failure.
Class Method Summary collapse
-
.shows?(severity, tags = nil) ⇒ Boolean
Both have to pass: a tag cannot raise a message above the level, nor the level rescue one the list leaves out.
Class Method Details
.shows?(severity, tags = nil) ⇒ Boolean
Both have to pass: a tag cannot raise a message above the level, nor the level rescue one the list leaves out.
8 9 10 11 12 13 14 |
# File 'lib/hubbado/log/display.rb', line 8 def self.shows?(severity, = nil) config = Log.config return false if SEVERITIES.fetch(severity.to_sym) < SEVERITIES.fetch(config.level) config..write?() end |