aaaah, the logging topic. This has come up a few times:
http://www.nabble.com/Changing-Logging-in-Solr-to-Apache-Commons-Logging-tf3484843.html#a9728641
and
http://www.nabble.com/logging---slf4j--tf3366438.html#a9366144
So far, the consensus has been that jdk logging is fine and can be
configured to do whatever you like. This is true for the web-app
context, and true (but annoying) for an embedded context.
I've been working on a solr+wicket interface - (wicket uses slf4j)
Personally, I would like to see solr use slf4j, but understand the
arguments for sticking with jdk logging
ryan
J.J. Larrea wrote:
Long on my to-do list has been trying to use sl4j as a bridge to escape the horrible
limitations of JDK1.4 java.util.logging unfortunately cemented into Solr, enter the
fairly peaceful garden of log4j, and avoid the pitfalls of commons-logging's trying to
class-load its way into everyone's living-room ("I am *your* logger!") but
knocking over the coffee table in the process.
And for my embedded-Solr indexer, I thought converting the logging calls to
sl4j's printf-style message formatting might additionally save some sorely
needed cycles. So I'm dismayed to hear that sl4j may not be as simple and
effective a bridge solution as I had hoped.
It's cool to know about the jul-log4j-bridge and I like the way with a single
method call one can effectively short-circuit j.u.l. by stealing its output,
but on very quick read it appears there is a potentially non-trivial
performance penalty from the need to re-multiplex everything, and some of the
limitations of j.u.l. remain in effect.
So count me as another attentive listener if anyone has some experience or at
least gossip pro or con either sl4j or the jul-log4j-bridge.
Thanks,
J.J. Larrea
At 6:13 AM -0800 11/14/07, Henrib wrote:
I'm in a situation where Solr is embedded in a webapp (ie using solr.jar).
Other modules of this app are using log4j and I'm looking for a way to make
the logging configuration consistent (aka through log4.xml).
Can anyone who solved the same kind of issue share his/her experience?
After much browsing, understanding why commons-logging, sl4j or others are
not solutions for Solr iself, I finally stumbled on
http://people.apache.org/~psmith/logging.apache.org/sandbox/jul-log4j-bridge/
which seems to provide a ready made solution.
Has anyone some experience & comment using it?
Thanks
--
View this message in context:
http://www.nabble.com/logging-through-log4j-tf4805241.html#a13747253
Sent from the Solr - Dev mailing list archive at Nabble.com.