The reason for the isXXXEnabled() methods is not the cost of the method
call which is minimal but to avoid constructing the log arguments which
typically involve a bunch of string manipulation which is time consuming.
The category.debug() call itself is very quick.

david jencks

On 2001.09.10 19:42:08 -0400 Hiram Chirino wrote:
> >From: Jason Dillon <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: <[EMAIL PROTECTED]>
> >Subject: Re: [JBoss-dev] log4j switchover - anyone working on this?
> >Date: Mon, 10 Sep 2001 14:41:20 -0700 (PDT)
> >
> >Are we still planning on dropping the older Log & Logger stuff in favor
> of
> >Log4j?  If so, lets replace Logger with a new class that extends from
> >Category, and provides Logger create() methods to access an instance. 
> It
> >would have the trace() and isTraceEnabled().
> >
> 
> If going with this approach, just a isTraceEnabled public variable so
> that 
> you don't incure the cost of a method call. (since you'll be doing the
> check 
> to avoid the cost a trace method call in the first place.)
> 
> Regards,
> Hiram
> 
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to