Class: Honeybadger::Logging::BootLogger

Inherits:
Base
  • Object
show all
Includes:
Singleton
Defined in:
lib/honeybadger/logging.rb

Instance Method Summary collapse

Methods inherited from Base

#level

Constructor Details

#initializeBootLogger

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