Module: XFTP::Helpers::Logging Private

Included in:
Session::Base, Session::SFTP::ProgressHandler
Defined in:
lib/xftp/helpers/logging.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Provides logging helper methods

Instance Method Summary collapse

Instance Method Details

#log(message, severity: :info, color: :white) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Appends message to log :reek:UtilityFunction:

Parameters:

  • message (String)

    the log message

  • severity (Symbol) (defaults to: :info)

    the message severity

  • color (Symbol) (defaults to: :white)


13
14
15
16
# File 'lib/xftp/helpers/logging.rb', line 13

def log(message, severity: :info, color: :white)
  text = message.colorize(color)
  XFTP.config.logger.public_send(severity, text)
end