Sha256: 36f7c0e12ef2f2efa3203f1877b7e5896775aa20c00fc8119e5ff6eb3b2d6d1f

Contents?: true

Size: 578 Bytes

Versions: 125

Compression:

Stored size: 578 Bytes

Contents

# This is like moderateconfig.rb, but using an XML config
# please look at moderate.xml

$: << '../lib'

require 'log4r'
require 'log4r/configurator'
include Log4r

# set any runtime XML variables
Configurator['logpath'] = './logs'
# Load up the config file
Configurator.load_xml_file('./moderate.xml')

# now repeat what moderateconfig.rb does
def do_logging(log)
log.debug "debugging"
log.info "a piece of info"
log.warn "Danger, Will Robinson, danger!"
log.error "I dropped my Wookie! :("
log.fatal "kaboom!"
end

Logger.each_logger{|logger| do_logging(logger) }
# stop here

Version data entries

125 entries across 87 versions & 15 rubygems

Version Path
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/examples/xmlconfig.rb
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/examples/xmlconfig.rb