Class: Honeybadger::Logging::StandardLogger Private

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
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.

Direct Known Subclasses

ConfigLogger, FormattedLogger

Instance Method Summary collapse

Methods inherited from Base

#add, #level

Constructor Details

#initialize(logger = Logger.new(nil)) ⇒ StandardLogger

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 StandardLogger

Raises:

  • (ArgumentError)

89
90
91
92
93
94
# File 'lib/honeybadger/logging.rb', line 89

def initialize(logger = Logger.new(nil))
  raise ArgumentError, 'logger not specified' unless logger
  raise ArgumentError, 'logger must be a logger' unless logger.respond_to?(:add)

  @logger = logger
end