Class: Log4r::YamlConfigurator

### Home Classes Methods

### In Files

- lib/log4r/yamlconfigurator.rb

### Parent

Object

### Methods

- ::[]
- ::[]=
- ::custom_levels
- ::load_yaml_file
- ::load_yaml_string

### Files

- GDC
- MDC
- NDC
- configurator
- emailoutputter
- formatter
- log4jxmlformatter
- log4r
- logger
- logserver
- outputter
- patternformatter
- scribeoutputter
- syslogoutputter
- win32eventoutputter
- yamlconfigurator

### Class/Module Index

Quicksearch

- Log4r
- Log4r::BasicFormatter
- Log4r::ConfigError
- Log4r::Configurator
- Log4r::DateFileOutputter
- Log4r::DefaultFormatter
- Log4r::EmailOutputter
- Log4r::FileOutputter
- Log4r::Formatter
- Log4r::GDC
- Log4r::IOOutputter
- Log4r::Log4jXmlFormatter
- Log4r::Log4rTools
- Log4r::LogEvent
- Log4r::LogServer
- Log4r::Logger
- Log4r::MDC
- Log4r::NDC
- Log4r::ObjectFormatter
- Log4r::Outputter
- Log4r::PatternFormatter
- Log4r::RemoteOutputter
- Log4r::RollingFileOutputter
- Log4r::RootLogger
- Log4r::ScribeOutputter
- Log4r::SimpleFormatter
- Log4r::StderrOutputter
- Log4r::StdoutOutputter
- Log4r::SyslogOutputter
- Log4r::UDPOutputter
- Log4r::YamlConfigurator
- REXML
- Object

No matching classes.

# Log4r::YamlConfigurator

See log4r/yamlconfigurator.rb

### Constants

ExcludeParams

### Public Class Methods

[](param) click to toggle source

Get a parameter's value

    # File lib/log4r/yamlconfigurator.rb, line 24
    def self.[](param); @@params[param] end

[]=(param, value) click to toggle source

Define a parameter with a value

    # File lib/log4r/yamlconfigurator.rb, line 26
    def self.[]=(param, value); @@params[param] = value end

custom_levels( levels) click to toggle source

    # File lib/log4r/yamlconfigurator.rb, line 29
    def self.custom_levels( levels)
      return Logger.root if levels.size == 0
      for i in 0...levels.size
        name = levels[i].to_s
        if name =~ /\s/ or name !~ /^[A-Z]/
          raise TypeError, "#{name} is not a valid Ruby Constant name", caller
        end
      end
      Log4r.define_levels *levels
    end

load_yaml_file( filename) click to toggle source

Given a filename, loads the YAML configuration for Log4r.

    # File lib/log4r/yamlconfigurator.rb, line 41
    def self.load_yaml_file( filename)
      actual_load( File.open( filename))
    end

load_yaml_string( string) click to toggle source

You can load a String YAML configuration instead of a file.

    # File lib/log4r/yamlconfigurator.rb, line 46
    def self.load_yaml_string( string)
      actual_load( string)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.