lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl <jan....@cominvent.com>
Subject Re: [POLL] How do you (like to) do logging with Solr
Date Wed, 18 May 2011 21:31:06 GMT
Hi,

If you've setup your Tomcat with log4j logging, and want to add Solr, within the same logging
config, you need to:
 #1. Remove slf4j-jdk14-1.6.1.jar from solr.war (unpack, remove, repack)
 #2. Download slf4j-log4j12-1.6.1.jar (from slf4j.org) and place it in e.g. tomcat/shared/lib

If solr.war shipped without a pre-packaged binding, you could skip #1. The binding jar you
deploy to appserver lib would also take effect for any other webapp using slf4j deployed to
the same app-server.

An alternative to manually repackage solr.war as in #1, is Hoss' suggestion in SOLR-2487 of
a new ANT option to build Solr artifacts without the JUL binding.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

On 18. mai 2011, at 18.33, Shawn Heisey wrote:

> On 5/17/2011 10:00 AM, Chris Hostetter wrote:
>> : If I understand what you've said above correctly, removing the binding in
>> : solr.war would make it inherit the binding in jetty/tomcat/whatever, is that
>> : right?  That sounds like an awesome plan to me.  The example jetty server can
>> : be configured instead of solr.war.  Once you've answered this, I can submit my
>> : vote.
>> 
>> no, removing the bindings in solr.war would result in solr not logging
>> *anything* unless you manually added a jar (defining the bindings you
>> want) to the jetty (or tomcat) system classloader.
> 
> What I'd want to have is the ability to download Solr source code, not modify anything,
create a .war, and drop it into an existing system that has my preferred logging already set
up, which from what you are saying would also require that the example have a jar with the
JDK bindings, and that everyone who sets up a more custom system create their own jar and
put it somewhere it can be found.
> 
> What's involved in creating that jar?  Is it something that a novice could get done?
 Is it something that could be prepackaged for the most common choices, or possibly already
available on the Internet?
> 
> Thanks,
> Shawn
> 


Mime
View raw message