Class Simp::Cli::Config::Logging::Logger
In: lib/simp/cli/config/logging.rb
Parent: Object

Methods

Public Class methods

Public Instance methods

log plain text to a log file and print formatted text to the console using HighLine formatting

level = :debug, :info, :warn, :error, :fatal args = sequence of alternating message part and corresponding

  format specifications, where each message part is a string and
  each format specification is either nil (no formatting) or an
  array contains 0 or more constants corresponding to HighLine
  formatting options.

NOTE: When the final part of a message ends in a ’ ’ character, HighLine suppresses the newline when the message is sent to the console.

Examples,

log_and_say(:debug, ‘this is an unformatted text message’) log_and_say(:warn, ‘this is a single-part, formatted text message’, [:BOLD, :RED]) log_and_say(:info, ‘this is a’, nil, ’ multi-part ’, [:BOLD], ‘formatted text message’) log_and_say(:info, ‘this is a message that does not end in a newline when sent to the console ’) log_and_say(:error, ‘this is a’, [], ’ message ’, [:RED], ‘that does not end in a newline when sent to the console ’)

pause log output to allow message of message_level to be viewed on the console

[Validate]