Class Logging::Config::YamlConfigurator
In: lib/logging/config/yaml_configurator.rb
Parent: Object

The YamlConfigurator class is used to configure the Logging framework using information found in a YAML file.

Methods

appender   appenders   layout   load   load   loggers   new   pre_config  

Classes and Modules

Class Logging::Config::YamlConfigurator::Error

Public Class methods

Load the given YAML file and use it to configure the Logging framework. The file can be either a filename, and open File, or an IO object. If it is the latter two, the File / IO object will not be closed by this method.

The configuration will be loaded from the given key in the YAML stream.

Creates a new YAML configurator that will load the Logging configuration from the given io stream. The configuration will be loaded from the given key in the YAML stream.

Public Instance methods

Creates a new Appender based on the given config options (a hash). The type of Appender created is determined by the ‘type’ option in the config. The remaining config options are passed to the Appender initializer.

The config options can also contain a ‘layout’ option. This should be another set of options used to create a Layout for this Appender.

Given an array of Appender configurations, this method will iterate over each and create the Appender(s).

Creates a new Layout based on the given config options (a hash). The type of Layout created is determined by the ‘type’ option in the config. The remaining config options are passed to the Layout initializer.

Loads the Logging configuration from the data loaded from the YAML file.

Given an array of Logger configurations, this method will iterate over each and create the Logger(s).

Configures the logging levels, object format style, and root logging level.

[Validate]