You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Allan Kamau <ka...@gmail.com> on 2016/05/20 19:54:49 UTC
Dynamically specifying log directory location on start of Solr 6 (on
CentOS 7)
I have several Solr 6 instances on one computer each listening on a
distinct port.
I would like to have the logging of each of these instances being written
to distinct directories under a common parent directory name.
Each of these instances is a copy of the "solr-6.0.0" installation without
the contrib, dist, docs and example directories.
I would like to be able to specify both the listening port number as well
as the log directory during the start of each instance.
I would like to avoid having to edit the
"${SOLR_HOME}/server/resources/log4j.properties" file of each of these
instances.
I have tried without success setting and export a bash environmental
variable then read this variable in the
"${SOLR_HOME}/server/resources/log4j.properties" file when setting the
value of "solr.log" variable.
for example (in the "${SOLR_HOME}/server/resources/log4j.properties" file)
solr.log=${solr_log_dir_file_name};
It is possible to set a value in the Java properties file to a value of a
system variable.
Is there another way, "${SOLR_HOME}/bin/solr start" seems not to have a
provision for this.
Allan.