On 10/15/2013 5:13 AM, Russell Taylor wrote:
> My problem is that all my indexes log to one log file but I want each index 
> to log to their own log file.
> 
> I'm using solr 4.4 and I've copied  jcl-over-slf4j-1.6.6.jar, 
> jul-to-slf4j-1.6.6.jar, log4j-1.2.16.jar, slf4j-api-1.6.6.jar and 
> slf4j-log4j12-1.6.6.jar
> into my tomcats lib/ directory.
> 
> I've added a logging.properties to each of my solr webapps in 
> tomcat/webapps/solr_webapp/WEB-INF/classes/logging.properties
> but when tomcat starts up it picks the first logging.properties (I presume) 
> file and then all indexes log to this file.
> 
> 
> My only solution is to add the 4 jar files to each of the solr webapps in 
> their tomcat/webapps/solr_webapp/WEB-INF/lib directory
> and then the webapp will pick up it's logging.properties file.

Although your solution might let you log each webapp to its own file,
you are incurring extra overhead by running each index in its own full
Solr install.  One Solr install can handle thousands of separate indexes
- we call them cores.

Most of the important parts of Solr will log the core name with the
request.  I'm in the process of trying to improve that so *everything*
will include the core name in the log.  See SOLR-5277.  When that work
is complete, it may even be possible to get those logs in separate files
by switching logging implementations or writing some a custom log4j
appender.

Side issue: logging.properties is the configuration file used by
java.util.logging ... but the jar files you have mentioned will set Solr
up to use log4j.  The config file for that is typically log4j.properties
or log4j.xml.

Thanks,
Shawn

Reply via email to