Class: Loghandler::Rules::GenericErrorLogRule
- Inherits:
-
AbstractRule
- Object
- AbstractRule
- Loghandler::Rules::GenericErrorLogRule
- Defined in:
- lib/loghandler/rules/generic_error_log_rule.rb
Instance Method Summary collapse
- #apply! ⇒ Object
-
#initialize(log_detail) ⇒ GenericErrorLogRule
constructor
A new instance of GenericErrorLogRule.
- #log ⇒ Object
- #loggable? ⇒ Boolean
- #persist? ⇒ Boolean
- #showable? ⇒ Boolean
Methods inherited from AbstractRule
Constructor Details
#initialize(log_detail) ⇒ GenericErrorLogRule
Returns a new instance of GenericErrorLogRule.
5 6 7 |
# File 'lib/loghandler/rules/generic_error_log_rule.rb', line 5 def initialize(log_detail) @log_detail=log_detail end |
Instance Method Details
#apply! ⇒ Object
8 9 10 |
# File 'lib/loghandler/rules/generic_error_log_rule.rb', line 8 def apply! @log_detail[:severity]="error" end |
#log ⇒ Object
11 12 13 |
# File 'lib/loghandler/rules/generic_error_log_rule.rb', line 11 def log @log_detail.to_json end |
#loggable? ⇒ Boolean
14 15 16 |
# File 'lib/loghandler/rules/generic_error_log_rule.rb', line 14 def loggable? true end |
#persist? ⇒ Boolean
17 18 19 |
# File 'lib/loghandler/rules/generic_error_log_rule.rb', line 17 def persist? false end |
#showable? ⇒ Boolean
20 21 22 |
# File 'lib/loghandler/rules/generic_error_log_rule.rb', line 20 def showable? true end |