Sha256: 10503e04f85969ebaac51427b0f376af7616b8297803241b96a20244fa9dcd48

Contents?: true

Size: 658 Bytes

Versions: 62

Compression:

Stored size: 658 Bytes

Contents

= Configuring Log4r with Log4r::YamlConfigurator

The YamlConfigurator class allows one to set up Log4r via YAML.
It is used almost exactly as Log4r::Configurator and has the same features,

  ycfg = YamlConfigurator    # handy shorthand
  ycfg['foo'] = bar          # replaces instances of #{foo} in the YAML with bar
  ycfg.load_yaml_file('foo.yaml')

Ruby 1.7 and 1.8 comes with a YAML parser. Hence, YAML can be used
to configure Log4r out of the box.

A comprehensive example of a Log4r YAML configuration is provided in the 
examples directory.

To use this class:

  require 'log4r/yamlconfigurator'

Thanks to Andreas Hund for making this possible.

Version data entries

62 entries across 54 versions & 13 rubygems

Version Path
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-cloudstack-1.2.0 vendor/bundle/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-cloudstack-1.1.0 vendor/bundle/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
log4rails-1.1.11 lib/log4r/rdoc/log4jxmlformatter
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
mtn_log4r-1.1.12 lib/log4r/rdoc/log4jxmlformatter
mtn_log4r-1.1.11 lib/log4r/rdoc/log4jxmlformatter
vinted-log4r-1.1.11 lib/log4r/rdoc/log4jxmlformatter
tnargav-1.3.3 vendor/bundle/ruby/1.9.1/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-shell-0.2.9 demo/templates/vendor/bundle/ruby/1.9.1/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
tnargav-1.2.3 vendor/bundle/ruby/1.9.1/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-shell-0.2.8 demo/templates/vendor/bundle/ruby/1.9.1/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-shell-0.2.6 vendor/bundle/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-shell-0.2.5 vendor/bundle/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter
vagrant-actionio-0.0.9 vendor/bundle/gems/log4r-1.1.10/lib/log4r/rdoc/log4jxmlformatter