On Sat, Dec 6, 2008 at 11:52 AM, Shai Erera <[EMAIL PROTECTED]> wrote: > On the performance side, I don't expect to see any different performance > than what we have today, since checking if infoStream != null should be > similar to logger.isLoggable (or the equivalent methods from SLF4J).
I'm leery of going down this logging road because people may add logging statements in inappropriate places, believing that isLoggable() is about the same as infoStream != null They seem roughly equivalent because of the context in which they are tested: coarse grained logging where the surrounding operations eclipse the logging check. isLoggable() involves volatile reads, which prevent optimizations and instruction reordering across the read. On current x86 platforms, no memory barrier instructions are needed for a volatile read, but that's not true of other architectures. -Yonik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]