Graham, unfortunately, Java does not have a precompiler (although I think there are some third party pre-processors about).
J -----Original Message----- From: Graham Reeds [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 2:05 PM To: Tomcat Users List Subject: Re: How to measue performance? Log4j on/off. >>>> As an aside, make sure you have all log4j Logger#debug statements enclosed in if(logger.isDebugEnabled()) { ... } clauses -- that's an order of magnitude or so runtime performance improvement. >>>> Showing my C heritage here, but can't you do something like Log("an error has occurred"); And in Log have a directive like class Logger() { void Log(string msg) { #ifdef DEBUG ... log message .. #endif }; And so you can compile a version with debug or no debug. Those if() statements are still going to take time to process, even if there is no logging going on. G. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
