Class: Honeybadger::Logging::BootLogger Private

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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Methods inherited from Base

#level

Constructor Details

#initializeBootLogger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of BootLogger


70
71
72
# File 'lib/honeybadger/logging.rb', line 70

def initialize
  @messages = []
end

Instance Method Details

#add(severity, msg) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


74
75
76
# File 'lib/honeybadger/logging.rb', line 74

def add(severity, msg)
  @messages << [severity, msg]
end

#flush(logger) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


78
79
80
81
82
83
# File 'lib/honeybadger/logging.rb', line 78

def flush(logger)
  @messages.each do |msg|
    logger.add(*msg)
  end
  @messages.clear
end