class CustomLogger
Custom Logger implementation which handles concatenation of multiple provided arguments into the log message string, allowing for much cleaner logging statements.
Public Instance Methods
debug(message, *args)
click to toggle source
Calls superclass method
# File lib/mangopay/util/custom_logger.rb, line 8 def debug(message, *args) super(format(message, args)) end
error(message, *args)
click to toggle source
Calls superclass method
# File lib/mangopay/util/custom_logger.rb, line 20 def error(message, *args) super(format(message, args)) end
fatal(message, *args)
click to toggle source
Calls superclass method
# File lib/mangopay/util/custom_logger.rb, line 24 def fatal(message, *args) super(format(message, args)) end
format(msg, msg_args)
click to toggle source
# File lib/mangopay/util/custom_logger.rb, line 28 def format(msg, msg_args) msg_args.each do |arg| msg.sub! '{}', arg.to_s end msg end
info(message, *args)
click to toggle source
Calls superclass method
# File lib/mangopay/util/custom_logger.rb, line 12 def info(message, *args) super(format(message, args)) end
warn(message, *args)
click to toggle source
Calls superclass method
# File lib/mangopay/util/custom_logger.rb, line 16 def warn(message, *args) super(format(message, args)) end