Class: Honeybadger::Logging::BootLogger
- Includes:
- Singleton
- Defined in:
- lib/honeybadger/logging.rb
Instance Method Summary collapse
- #add(severity, msg) ⇒ Object
- #flush(logger) ⇒ Object
-
#initialize ⇒ BootLogger
constructor
A new instance of BootLogger.
Methods inherited from Base
Constructor Details
#initialize ⇒ BootLogger
Returns a new instance of BootLogger.
64 65 66 |
# File 'lib/honeybadger/logging.rb', line 64 def initialize @messages = [] end |
Instance Method Details
#add(severity, msg) ⇒ Object
68 69 70 |
# File 'lib/honeybadger/logging.rb', line 68 def add(severity, msg) @messages << [severity, msg] end |
#flush(logger) ⇒ Object
72 73 74 75 76 77 |
# File 'lib/honeybadger/logging.rb', line 72 def flush(logger) @messages.each do |msg| logger.add(*msg) end @messages.clear end |