[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Debug level errors with log4r

Nexos

6/22/2006 2:46:00 PM

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