module Net::SSH::Loggable

def debug

greater.
Displays the result of yielding if the log level is Logger::DEBUG or
def debug
  logger.add(Logger::DEBUG, nil, facility) { yield } if logger && logger.debug?
end

def error

greater.
Displays the result of yielding if the log level is Logger:ERROR or
def error
  logger.add(Logger::ERROR, nil, facility) { yield } if logger && logger.error?
end

def facility

appended.
originates. It defaults to the name of class with the object_id
Sets the "facility" value, used for reporting where a log message
def facility
  @facility ||= self.class.to_s.gsub(/::/, ".").gsub(/([a-z])([A-Z])/, "\\1_\\2").downcase + "[%x]" % object_id
end

def fatal

greater.
Displays the result of yielding if the log level is Logger::FATAL or
def fatal
  logger.add(Logger::FATAL, nil, facility) { yield } if logger && logger.fatal?
end

def info

greater.
Displays the result of yielding if the log level is Logger::INFO or
def info
  logger.add(Logger::INFO, nil, facility) { yield } if logger && logger.info?
end

def lwarn

greater. (Called lwarn to avoid shadowing with Kernel#warn.)
Displays the result of yielding if the log level is Logger::WARN or
def lwarn
  logger.add(Logger::WARN, nil, facility) { yield } if logger && logger.warn?
end