Sha256: 73a21472c795a26c4c510acf54b7f12bb9f5af64e5c10eab0cb0c7edfb4fa8b2

Contents?: true

Size: 606 Bytes

Versions: 127

Compression:

Stored size: 606 Bytes

Contents

# Here's how to start using log4r right away
$: << File.join('..','lib')                   # path if log4r not installed
require "log4r"

Log = Log4r::Logger.new("outofthebox")        # create a logger
Log.add Log4r::Outputter.stderr               # which logs to stdout

# do some logging
def do_logging
 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
do_logging

# now let's filter anything below WARN level (DEBUG and INFO)
puts "-= Changing level to WARN =-"
Log.level = Log4r::WARN
do_logging

Version data entries

127 entries across 89 versions & 15 rubygems

Version Path
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/log4r-1.1.10/examples/outofthebox.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/examples/outofthebox.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/examples/outofthebox.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/examples/outofthebox.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/examples/outofthebox.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/examples/outofthebox.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/log4r-1.1.10/examples/outofthebox.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/log4r-1.1.10/examples/outofthebox.rb
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/gems/log4r-1.1.10/examples/outofthebox.rb
depengine-0.0.31 etc/isolate/ruby-1.8/gems/log4r-1.1.8/examples/outofthebox.rb
depengine-0.0.31 etc/isolate/jruby-1.8/gems/log4r-1.1.8/examples/outofthebox.rb
depengine-0.0.30 etc/isolate/ruby-1.8/gems/log4r-1.1.8/examples/outofthebox.rb
depengine-0.0.30 etc/isolate/jruby-1.8/gems/log4r-1.1.8/examples/outofthebox.rb
depengine-0.0.29 etc/isolate/ruby-1.8/gems/log4r-1.1.8/examples/outofthebox.rb
depengine-0.0.29 etc/isolate/jruby-1.8/gems/log4r-1.1.8/examples/outofthebox.rb
depengine-0.0.28 etc/isolate/ruby-1.8/gems/log4r-1.1.8/examples/outofthebox.rb
depengine-0.0.28 etc/isolate/jruby-1.8/gems/log4r-1.1.8/examples/outofthebox.rb
depengine-0.0.27 etc/isolate/ruby-1.8/gems/log4r-1.1.8/examples/outofthebox.rb
depengine-0.0.27 etc/isolate/jruby-1.8/gems/log4r-1.1.8/examples/outofthebox.rb
depengine-0.0.26 etc/isolate/ruby-1.8/gems/log4r-1.1.8/examples/outofthebox.rb