module HrrRbSsh::Loggable

Attributes

log_key[RW]
logger[RW]

Public Instance Methods

log_debug() { || ... } click to toggle source
# File lib/hrr_rb_ssh/loggable.rb, line 32
def log_debug
  if logger
    logger.debug(log_key){ yield }
  end
end
log_error() { || ... } click to toggle source
# File lib/hrr_rb_ssh/loggable.rb, line 14
def log_error
  if logger
    logger.error(log_key){ yield }
  end
end
log_fatal() { || ... } click to toggle source
# File lib/hrr_rb_ssh/loggable.rb, line 8
def log_fatal
  if logger
    logger.fatal(log_key){ yield }
  end
end
log_info() { || ... } click to toggle source
# File lib/hrr_rb_ssh/loggable.rb, line 26
def log_info
  if logger
    logger.info(log_key){ yield }
  end
end
log_warn() { || ... } click to toggle source
# File lib/hrr_rb_ssh/loggable.rb, line 20
def log_warn
  if logger
    logger.warn(log_key){ yield }
  end
end