How to deploy the same webapp with different protocols? (Tomcat, Solr)

We use several instances of solr on tomcat , but want them to be logged in different log files. How can we do this?

We use the follwing xml file called tomcat / conf / Catalina / localhost to make it work:

<Context docBase="/pathtosolr/dist/apache-solr-1.4.0.war" debug="0" crossContext="true" > <Environment name="solr/home" type="java.lang.String" value="/pathtosolr/solr" override="true" /> </Context> 

Update . From Jems answer I found this documentation :

Tomcat offers a choice between settings for all applications or settings, especially for the Solr application.

To change the logging options for Solr only, edit the tomcat / webapps / solr / WEB-INF / classes / logging.properties file. You will need to create a class directory and a logging.properties file. You can set levels from FINEST to SEVERE for a class or the entire package. Here are some examples:

org.apache.commons.digester.Digester.level = FINEST

org.apache.solr.level = WARNING

Alternatively, if you want to change the Tomcats JDK Logging API API settings for each application in this Tomcat instance, edit the tomcat / conf / logging.properties file.

For more information, see the SLF4J Registration API documentation:

http://slf4j.org/docs.html

+4
source share
2 answers

There seems to be no good solution:

2008 and 2010

except for repackaging the solr.war file with another logging configuration file.

Update: see accepted answer!

0
source

Source: https://habr.com/ru/post/1312583/


All Articles