cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " Stefano Mazzocchi" <stef...@apache.org>
Subject Re: AW: log performance penalties
Date Sat, 24 Feb 2001 10:21:34 GMT
----- Original Message -----
From: "Paul Russell" <paul@luminas.co.uk>
To: <cocoon-dev@xml.apache.org>
Sent: Friday, February 23, 2001 6:01 PM
Subject: Re: AW: log performance penalties


> * Carsten Ziegeler (cziegeler@sundn.de) wrote :
> > I would suggest we start converting/implementing the logging in the way
Stefano suggested.
> > Either by
> > 1. if (logger.debugIsActive()) logger.debug(...)
>
> +1
>
> > 2. if (LOG && logger.debugIsActive()) logger.debug(...)
>
> -1, because it over-complicates things, and I don't _really_ think it's
> necessary. I assume logger.debugIsActive() is a fairly light weight
> call, so we wouldn't be gaining too much.

I tend to disagree: having a finely granular debugging infrastucture in
place is *always* significant, no matter what evolution stage of the code
you reach since you'll always have to modify stuff and break them.

More than performance, I'm talking about size!

Think about it: all the strings must be stored, this increases the class
size.

It's the best logging practice anyway since its as close to ASP you can get
with Java today.

I vote for something like

 if (Cocoon.LOG && logger.channelIsActive(Logger.DEBUG)) {
   logger.debug("this " + is " pretty " + expensive);
 }

Stefano.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message