[lnkForumImage]
TotalShareware - Download Free Software

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


 

Patrick Spence

8/1/2006 3:50:00 PM

The following code is throwing errors below. It looks like the wrong
module is getting referenced. The constructor for
c:\ruby\lib\ruby\1.8\Logger.rb takes 3-arguments. Seems to be some
confusion here. Can someone point me in the right direction?

Thanks!


require 'log4r'
include Log4r

#-- error getting thrown on this line
mylog = Logger.new('errorLogger.txt', nil, nil, true)

# Now we can log.
def do_log(log)
log.debug "This is a message with level DEBUG"
log.info "This is a message with level INFO"
log.warn "This is a message with level WARN"
log.error "This is a message with level ERROR"
log.fatal "This is a message with level FATAL"
end

do_log(mylog)

#--
#-- errors
#--
wrong number of arguments (4 for 3)
testLogger.rb:18:in `initialize'
testLogger.rb:18
testLogger.rb:18:in `initialize': wrong number of arguments (4 for 3)
(ArgumentError)
from testLogger.rb:18

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

8 Answers

Patrick Spence

8/1/2006 6:57:00 PM

0

Nicolai Reuschling wrote:
> Logger.new() takes only three (not 4) parameters.
>
> See http://log4r.sourceforge.net/rdoc/classes/Log4r/L....

This is what threw me off...

def initialize(_fullname, _level=nil, _additive=true, _trace=false)
# validation
raise ArgumentError, "Logger must have a name", caller if
_fullname.nil?
Log4rTools.validate_level(_level) unless _level.nil?
validate_name(_fullname)

# create the logger
@fullname = _fullname
@outputters = []
@additive = _additive
deal_with_inheritance(_level)
LoggerFactory.define_methods(self)
self.trace = _trace
Repository[@fullname] = self
end

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

WaIIy

8/31/2010 11:55:00 PM

0

On Tue, 31 Aug 2010 17:35:56 -0500, Rick <nomail@for.mee> wrote:

>On Tue, 31 Aug 2010 16:37:25 -0400, Dave K wrote:
>>
>> OK, having the money always has had an advantage, but this has gone
>> beyond the pale.
>
>I heard a term yesterday, "beltway bandits". I think it fits pretty well.


I like that "The Beckoning"

excellent

Dave K

9/1/2010 12:37:00 AM

0

On Tue, 31 Aug 2010 19:55:25 -0400, WaIIy <WaIIy@(nft).invalid> wrote:

>On Tue, 31 Aug 2010 17:35:56 -0500, Rick <nomail@for.mee> wrote:
>
>>On Tue, 31 Aug 2010 16:37:25 -0400, Dave K wrote:
>>>
>>> OK, having the money always has had an advantage, but this has gone
>>> beyond the pale.
>>
>>I heard a term yesterday, "beltway bandits". I think it fits pretty well.
>
>
>I like that "The Beckoning"
>
>excellent

I actually agree with you. It was a term made up by Keith Olberman
of MSNBC. He is very good.<g>

<http://videos.wittysparks.com/id/20...
--

Cheers! :)

Ray

9/2/2010 12:39:00 AM

0

On Tue, 31 Aug 2010 16:37:25 -0400, Dave K <dave.k@att.net> wrote:

>On Tue, 31 Aug 2010 05:54:42 -0500, Rick <nomail@for.mee> wrote:
>
>>What amazes me is how many think their side are the winners and the other
>>side is the enemy.
>
> I used to think it was just opposing views, but class warfare
>against the backbone of this country has been successfully waged, and
>there are still people buying into those failed policies that have
>decimated the middle class.
>
>>
>>The only losers in this continual escalation of polarization is us.
>
> True.
>>
>>I don't know who originated the idea, and don't care, but I really like
>>the idea of not voting for *ANY* incumbant. Lacking term limits, this is
>>the only way I see of returning any real representation to congress.

Keep in mind people elected Obama & look how screwed up he has things
now. Now that its to late people are running from BHO.

> I am not sure that would work. I have this vision of a briefing
>that all new congresscritters attend that educates them on how to
>feather their own nest irrespective of the cost to, "We, the people."
>
> In any case, until we get out of this year+ long orgy of
>campaigning, and get the money from lobbyists out of the picture, we
>will be doomed to those with the money making the rules.
>
> OK, having the money always has had an advantage, but this has gone
>beyond the pale.
--
Ray
Mind over matter, if you don?t mind, it don?t matter.
(Confucius)

Dave K

9/2/2010 12:48:00 AM

0

On Wed, 01 Sep 2010 19:38:39 -0500, Ray <askwho@nothere-there.net>
wrote:

Ray tries, but he cannot help but be the source of one-liners that
have no substance whatever. Another empty Ray post.

--

"Watch out where the Huskies go,
and don't you eat that yellow snow..."

-Frank Zappa. "Don't Eat the Yellow Snow." Apostrophe Album

TomAldrich

9/2/2010 1:59:00 AM

0


On 1-Sep-2010, Dave K <dave.k@att.net> wrote:

> Ray tries, but he cannot help but be the source of one-liners that
> have no substance whatever. Another empty Ray post.

Don't waste yourself on a troll

Ray

9/4/2010 1:37:00 AM

0

On Wed, 01 Sep 2010 20:48:21 -0400, Dave K <dave.k@att.net> wrote:

>On Wed, 01 Sep 2010 19:38:39 -0500, Ray <askwho@nothere-there.net>
>wrote:
>
> Ray tries, but he cannot help but be the source of one-liners that
>have no substance whatever. Another empty Ray post.

Poor CONNED Dave. Look at his one liners. LMAO
--
Ray
Mind over matter, if you don?t mind, it don?t matter.
(Confucius)

Dave K

9/4/2010 1:43:00 AM

0

On Fri, 03 Sep 2010 20:36:48 -0500, Ray <askwho@nothere-there.net>
wrote:

Nothing from Ray again. Poor empty Ray.
--

"You can't fix stupid!"
-Ron White