On 10/15/2012 1:32 PM, Chris Hostetter wrote:
I think one, or both, of us is confused about how the dist-war-excl-slf4j target is intended to be used.
You arevery likely correct, and it's probably me that's confused.
I'm fairly certain you can't try to use slf4j/log4j from the sharedLib -- because at that point a lot of solr has already been initialized and already started doing logging so slf4j should have already tried to resolve the binding it should use, found nothing, and picked it's default NOP implementation -- as you can see in your logs... : SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". : SLF4J: Defaulting to no-operation (NOP) logger implementation : SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further : details. I *believe* the intended way to us the -excl-slf4j.war is by having the servlet container load both the log4j.jar and the slf4j binding for log4j -- either by putting it in the jetty/lib, or by specifing them in the runtime classpath -- but I think you also need to configure log4j at the servlet container level so that it will be initialized.
I tried both of these-- putting them in jetty's lib, as well as putting them inan arbitrary directory and and putting the relative path (blah/filename.jar) on the commandline with -cp (and -classpath). I suspect what I will need to do is create the standard war, extract it, fiddle with the contents, and then make a new war. Not terribly automated, but upgrading is not something I will be doing all that often. In my test environment (where multiple back to back compiles may be commonplace) it will be a bit painful, but I suppose I can just build the standard war and use jdk logging there, until I'm ready to deploy to production.
: I also tried putting the slf4j jars in /opt/solr4/lib (jetty's lib directory). : Unsurprisingly, there was no change. Where can I put the jars to make this did you move them or copy them, because it wouldn't suprise me if having duplicate copies of those slf4j jars in sharedLib broke logging in solr even if things were configured and working properly at the jetty level.
I thought of this, and was using 'mv' for each test iteration. Thanks, Shawn