Module Facter::Core::Logging
In: lib/facter/core/logging.rb

Methods

Constants

GREEN = ""   @api private
RESET = ""   @api private

Public Instance methods

Clears the seen state of debug and warning messages. See {debugonce} and {warnonce}.

@return [void]

@api private

Prints a debug message if debugging is turned on

@param msg [String] the debug message @return [void]

Enable or disable logging of debug messages

@param bool [true, false] @return [void]

@api private

Is debugging enabled?

@return [true, false]

@api private

Prints a debug message only once.

@note Uniqueness is based on the string, not the specific location

  of the method call.

@param msg [String] the debug message @return [void]

Used to register a callback that is called when a message is logged. If a block is given, Facter will not log messages. If a block is not given, Facter will resume logging messages. @param block [Proc] the callback to call when a message is logged.

  The first argument to the callback will be a symbol representing a level. The supported
  levels are: :trace, :debug, :info, :warn, :error, and :fatal.
  The second argument to the callback will be a string containing the message
  that was logged.

@api public

Print timing information

@param string [String] the time to print @return [void]

@api private

Enable or disable logging of timing information

@param bool [true, false] @return [void]

@api private

Returns whether timing output is turned on

@api private

Prints a warning message. The message is only printed if debugging is enabled.

@param msg [String] the warning message to be printed

@return [void]

Prints a warning message only once per process. Each unique string is printed once.

@note Unlike {warn} the message will be printed even if debugging is

  not turned on. This behavior is likely to change and should not be
  relied on.

@param msg [String] the warning message to be printed

@return [void]

[Validate]