Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Changing Log4r methods

Reply
Thread Tools

Changing Log4r methods

 
 
Erling Jepsen
Guest
Posts: n/a
 
      08-31-2006
Hello,

Can anybody here tell me why the example below is not outputting
"Overruling error" on the log.error ?

---------
require 'log4r'
include Log4r

class MyLogger < Log4r::Logger
def error(progname = nil, &block)
add(ERROR, nil, progname, "Overruling error")
end
end

log = MyLogger.new('logtest')
log.outputters = Outputter.stdout
log.level = Logger:EBUG

log.error("Caught an error")

---------

Thanks.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Erling Jepsen
Guest
Posts: n/a
 
      09-04-2006
Nobody?


--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to find the class methods of a class, just like'methods' finds the instance methods? Kenneth McDonald Ruby 5 09-26-2008 03:09 PM
log4r style John Ruby 1 10-01-2003 03:06 PM
[ANN] Log4r 1.0.4 and update on adopting log4r Leon Torres Ruby 1 09-03-2003 08:10 PM
[ANN] Log4r 1.0.3 Leon Torres Ruby 1 09-01-2003 11:28 PM
Log4r and Ruby 1.8.0 in Singleton problems David Heinemeier Hansson Ruby 0 08-05-2003 10:17 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57