tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: [TC4.0] Disabling debug output...
Date Thu, 19 Jul 2001 00:36:04 GMT
On Thu, Jul 19, 2001 at 12:16:27AM +0100, Pier P. Fumagalli wrote:
> Checking out the source code, I see a lot of // (commented out lines) when
> debug() is supposed to be called...
> Can't we have a global constant boolean called DEBUG and replace the // with
> if (DEBUG), so that we can simply compile in and out the debugging
> information without touching the sources?
> 
> Check out org.apache.catalina.connector.warp.Constants and WarpLogger... Old
> trick we used in JServ. :)

I *believe* most Java compilers do not have constant conditional 
optimizations (they certainly could, but I don't think they did last
time I checked).  Without that optimization, you must check that 
value each time you execute the statement.  That might hurt.  -- justin


Mime
View raw message