struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson, Laird" <Laird.Nel...@FMR.COM>
Subject RE: Best Practices for Logging?
Date Fri, 06 Dec 2002 21:48:11 GMT
> -----Original Message-----
> From: Rene Eigenheer [mailto:reigenheer@bridgesolutions.net]
> I often see debug messages code like:
> if (log.isDebugEnabled() {
>    log.debug("debug message");
> }
> and sometimes:
> log.debug("debug message");  // let the log class decide 
> whether it has to
> do debug
> which of the two versions do you prefer - why?

The latter incurs a String creation; the first does not.

Cheers,
Laird

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message