Re: Solr 4.4 with log4j and multiple indexes on tomcat 6

2013-10-15 Thread Otis Gospodnetic
Hi Russ,

It's not really indexes that lit,  but Solr running in Tomcat, so I don't
think there's a way...

Otis
Solr  ElasticSearch Support
http://sematext.com/
On Oct 15, 2013 7:14 AM, Russell Taylor 
russell.tay...@interactivedata.com wrote:

 Hi,
 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.

 Does anyone have a solution where I don't need to add the 4 jars to each
 of the solr webapps but still get a log file per index.


 Thanks

 Russ.



 ***
 This message (including any files transmitted with it) may contain
 confidential and/or proprietary information, is the property of Interactive
 Data Corporation and/or its subsidiaries, and is directed only to the
 addressee(s). If you are not the designated recipient or have reason to
 believe you received this message in error, please delete this message from
 your system and notify the sender immediately. An unintended recipient's
 disclosure, copying, distribution, or use of this message or any
 attachments is prohibited and may be unlawful.
 ***



Re: Solr 4.4 with log4j and multiple indexes on tomcat 6

2013-10-15 Thread Shawn Heisey
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