lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: Java logging in Lucene
Date Mon, 08 Dec 2008 14:44:16 GMT
On Sat, Dec 6, 2008 at 11:52 AM, Shai Erera <> 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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message