Debug level errors with log4r

N

Nexos

Hello, I'm using the script lib Log4r included in ruby 1.8.4 and I have
a problem with the following code:

require 'rubygems'
require 'Log4r'
include Log4r

#Log4r::Logger.root.level = WARN
$mylog = Log4r::Logger.new("simpleLogger", DEBUG)
console = Log4r::StderrOutputter.new 'console'
$mylog.add('console')
$mylog.debug("Hello, world2")
$mylog.info("Hello, INFO")

=> I get the following error: "uninitialized constant DEBUG
(NameError)"

However, if I uncomment the (root level) line, there is no error, but
nothing is displayed.µ

Does anyone have any clue ?

Thanks in advance,

Frédéric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,600
Members
45,180
Latest member
CryptoTax Software
Top