cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Royal <pro...@managingpartners.com>
Subject Re: CocoonServlet.java patch
Date Tue, 15 Jan 2002 14:49:12 GMT
On Thursday 10 January 2002 01:46 pm, Santiago Gala wrote:
> debug(String msg) {
>     //current impl
>     }
> debug(String msg1, String msg2) {
>     if( isDebugEnabled() )
>         debug(msg1 + msg2); //check for null?
>     }
> ... and so on.
>
> I feel that 4 String pieces would cover more than 80% of cases (WIth 5
> pieces possibly up to 99%), while keeping user code relatively elegant.
> At least I would prefer it to the alternative of having debug statements
> wrapped in ifs.

While that may seem ideal if you're passing in a simple string, what if one 
of the components in the debug message is the .toString() of an object, which 
internally constructs a long debugging string? With your method above you 
still have to take the hit for constructing that string.
-pete

-- 
peter royal -> proyal@managingpartners.com

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


Mime
View raw message