Not sure if it will solve your specific problem. We use Solr as a WAR as well 
as Solrj.  So the main solr distribution comes with slf4j-jdk-1.5.5.jar. I just 
deleted that and replaced it with slf4j-log4j12-1.5.5.jar. And then it used my 
existing log4j.properties file.




________________________________
From: Lucas F. A. Teixeira <lucas...@gmail.com>
To: solr-user@lucene.apache.org
Sent: Tue, March 2, 2010 11:14:26 AM
Subject: Logging in Embedded SolrServer - What a nightmare.

Hello all,

I'm having a hard time trying to change Solr queries logging level.
I've tried a lot of things I've found in the internet, this mailing list and
solr docs.

What I've found so far:

- Solr Embedded Server uses sfl4j lib for intermediating logging. Here I'm
using Log4j as my logging framework.
- Changing the .../jre/lib/logging.properties worked, but only when querying
using solr over http, and not on solr embedded.
- A log4j.xml that I've added it is not being respected. (It is logging with
a totally different layout and appenders)
- I've searched for other log4j config files in the classpath, and found
nothing...
- Even tried to call Logger.getLogger("org.apache.solr") and then set its
level manually inside the app, nothing changed...

So, Embedded Solr Server keeps logging queries and other stuff in my stdout.

Most docs and guides I've found in the internet is talking about solr http,
this is ok for me, with http I got everything working, but not with solr
embedded.
Have anyone achieved this with embedded?

Thanks a lot ppl,

[]s,


Lucas Frare Teixeira .ยท.
- lucas...@gmail.com
- lucastex.com.br
- blog.lucastex.com
- twitter.com/lucastex



      

Reply via email to