Class: Honeybadger::Logging::StandardLogger Private
- 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
Instance Method Summary collapse
- #add(severity, msg, progname = LOGGER_PROG) ⇒ Object private
-
#initialize(logger = Logger.new(nil)) ⇒ StandardLogger
constructor
private
A new instance of StandardLogger.
Methods inherited from Base
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.
90 91 92 93 94 95 |
# File 'lib/honeybadger/logging.rb', line 90 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 |
Instance Method Details
#add(severity, msg, progname = LOGGER_PROG) ⇒ 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.
97 98 99 |
# File 'lib/honeybadger/logging.rb', line 97 def add(severity, msg, progname=LOGGER_PROG) @logger.add(severity, msg, progname) end |