Class: EXEL::Logging::LoggerWrapper

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/exel/logging/logger_wrapper.rb

Overview

Wraps calls to a logger to add EXEL::Logging prefix to log messages

Constant Summary collapse

LOG_LEVELS =
%i(debug info warn error fatal unknown).freeze

Instance Method Summary collapse

Instance Method Details

#add(severity, message = nil, progname = nil) ⇒ Object



22
23
24
25
# File 'lib/exel/logging/logger_wrapper.rb', line 22

def add(severity, message = nil, progname = nil)
  message = yield if message.nil? && block_given?
  __getobj__.add(severity, "#{Logging.prefix}#{message}", progname)
end