lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan McKinley <ryan...@gmail.com>
Subject Re: Programmatically configuring SLF4J for Solr 1.4?
Date Mon, 02 Nov 2009 05:00:55 GMT
I'm sure it is possible to configure JDK logging (java.util.loging)  
programatically... but I have never had much luck with it.

It is very easy to configure log4j programatically, and this works  
great with solr.

To use log4j rather then JDK logging, simply add slf4j- 
log4j12-1.5.8.jar (from http://www.slf4j.org/download.html) to your  
classpath

ryan



On Nov 1, 2009, at 11:05 PM, Don Werve wrote:

> So, I've spent a bit of the day banging my head against this, and  
> can't get
> it sorted.  I'm using a DirectSolrConnection embedded in a JRuby
> application, and everything works great, except I can't seem to get  
> it to do
> anything except log to the console.  I've tried pointing
> 'java.util.logging.config.file' to a properties file, as well as  
> specifying
> a logfile as part of the constructor for DirectSolrConnection, but  
> so far,
> nothing has really worked.
>
> What I'd like to do is programmatically direct the Solr logs to a  
> logfile,
> so that I can have my app start up, parse its config, and throw the  
> Solr
> logs where they need to go based on that.
>
> So, I don't suppose anybody has a code snippet (in Java) that sets  
> up SLF4J
> for Solr logging (and that doesn't reference an external properties  
> file)?
>
> Using the latest (1 Nov 2009) nightly build of Solr 1.4.0-dev


Mime
View raw message