module Honeybadger::Logging::Helper
Logging
helper methods. Requires a Honeybadger::Config
@config instance variable to exist and/or logger
to be defined. Each method is defined/block captured in this module rather than delegating to the logger directly to avoid extra object allocation.
Private Instance Methods
Source
# File lib/honeybadger/logging.rb, line 18 def debug(msg = nil) return true unless logger.debug? msg = yield if block_given? logger.debug(msg) end
Also aliased as: d
Source
# File lib/honeybadger/logging.rb, line 37 def error(msg = nil) return true unless logger.error? msg = yield if block_given? logger.error(msg) end
Source
# File lib/honeybadger/logging.rb, line 25 def info(msg = nil) return true unless logger.info? msg = yield if block_given? logger.info(msg) end
Source
# File lib/honeybadger/logging.rb, line 31 def warn(msg = nil) return true unless logger.warn? msg = yield if block_given? logger.warn(msg) end