On 3/7/07, Ryan McKinley <[EMAIL PROTECTED]> wrote:
Is there any interest in using slf4j (http://www.slf4j.org/) rather
then forcing folks to use JDK logging?

The nice thing about slf4j is that user can easily switch the logger
implementation.  The other nice thing is its use of message formats.
This means you don't have to wrap stuff in if( level >= DEBUG ).  By
default, the stuff you print out (even toString() ) isn't executed
unless that logging level is set.

  logger.debug("value: {}.", entry.somethingThatTakesSomeTime() );

Well, it isn't quite that simple: entry.somethingThatTakesSomeTime()
will be executed in the example you provide.  From what I've gleaned
by glancing at the site,  it appears to be necessary to hide the calls
in the toString method of some object to delay the execution.  Too bad
this isn't python or lisp ;).

I'm not particularly enmeshed in the enterprise java philosophy, but
ISTM that this type of choice matters more for frameworks and
containers than stand-alone products like Solr.  I'm also loathe to
introduce dependencies unless there is a clear need.

OTOH, I'm certainly not against it if people have used it and found a
clear benefit that they believe will carry over to Solr.

-Mike

Reply via email to