Class MCollective::Log
In: lib/mcollective/log.rb
Parent: Object

A simple class that allows logging at various levels.

Methods

Constants

VALID_LEVELS = [:error, :fatal, :debug, :warn, :info]

Public Class methods

configures the logger class, if the config has not yet been loaded we default to the console logging class and do not set @configured so that future calls to the log method will keep attempting to configure the logger till we eventually get a logging preference from the config module

increments the active log level

Logs at debug level

Logs at error level

Logs at fatal level

figures out the filename that called us

Logs at info level

handle old code that relied on this class being a singleton

logs a message at a certain level

Obtain the class name of the currently configured logger

Logs a message at a certain level, the message must be a token that will be looked up from the i18n localization database

Messages can interprolate strings from the args hash, a message with "foo %{bar}" in the localization database will use args[:bar] for the value there, the interprolation is handled by the i18n library itself

sets the logger class to use

Logs at warn level

[Validate]