module Calendly::Loggable

Calendly logger utility module.

Public Instance Methods

debug_log(msg) click to toggle source
# File lib/calendly/loggable.rb, line 18
def debug_log(msg)
  log msg, :debug
end
error_log(msg) click to toggle source
# File lib/calendly/loggable.rb, line 6
def error_log(msg)
  log msg, :error
end
info_log(msg) click to toggle source
# File lib/calendly/loggable.rb, line 14
def info_log(msg)
  log msg, :info
end
warn_log(msg) click to toggle source
# File lib/calendly/loggable.rb, line 10
def warn_log(msg)
  log msg, :warn
end

Private Instance Methods

log(msg, level = :info) click to toggle source
# File lib/calendly/loggable.rb, line 24
def log(msg, level = :info)
  logger = Calendly.configuration.logger
  return unless logger
  return unless logger.respond_to? level

  logger.send level, msg
end