Class: Hubbado::Log::Controls::RailsLogger
- Inherits:
-
Object
- Object
- Hubbado::Log::Controls::RailsLogger
- Defined in:
- lib/hubbado/log/controls/rails_logger.rb
Overview
Stands in for Rails.logger, recording the lines it was asked to write.
It answers to the severities Rails' own logger answers to, and deliberately not to
trace, which Rails has no method for. A handler passing the gem's lowest severity
straight through raises here exactly as it would in a Rails application, rather than
being quietly recorded and passing a spec.
Constant Summary collapse
- SEVERITIES =
%i[debug info warn error fatal unknown].freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#lines ⇒ Object
Each entry is the severity it was written at and the text of it.
Class Method Details
.example ⇒ Object
13 |
# File 'lib/hubbado/log/controls/rails_logger.rb', line 13 def self.example = new |
Instance Method Details
#lines ⇒ Object
Each entry is the severity it was written at and the text of it.
16 |
# File 'lib/hubbado/log/controls/rails_logger.rb', line 16 def lines = @lines ||= [] |