Class Nanoc3::CLI::Logger
In: lib/nanoc3/cli/logger.rb
Parent: Object

Nanoc3::CLI::Logger is a singleton class responsible for generating feedback in the terminal.

Methods

file   log   new  

Included Modules

Singleton

Constants

ACTION_COLORS = { :create => "\e[1m" + "\e[32m", # bold + green :update => "\e[1m" + "\e[33m", # bold + yellow :identical => "\e[1m", # bold :skip => "\e[1m"

External Aliases

color -> color?

Attributes

color  [RW]  Whether to use color in log messages or not
level  [RW]  The log level, which can be :high, :low or :off (which will log all messages, only high-priority messages, or no messages at all, respectively).

Public Class methods

Public Instance methods

Logs a file-related action.

level:The importance of this action. Can be :high or :low.
action:The kind of file action. Can be :create, :update or :identical.
identifier:The identifier of the item the action was performed on.

Logs a message.

level:The importance of this message. Can be :high or :low.
s:The message to be logged.
io:The IO instance to which the message will be written. Defaults to standard output.

[Validate]