SEARCH-247: Explicitly specifying the location of the log file

This avoids classpath scanning to load the log file from alfresco-
core.jar
This commit is contained in:
Gethin James
2016-11-28 10:10:40 +01:00
parent c450ca5893
commit a8fb366af5
4 changed files with 11 additions and 4 deletions
+3 -1
View File
@@ -21,7 +21,9 @@ docker run --rm "$dockerImage" [ -d /opt/alfresco-solr/data/content ] || (echo "
docker run --rm "$dockerImage" [ -d /opt/alfresco-solr/data/alfrescoModels ] || (echo "alfrescoModels dir does not exist" && exit 1)
docker run --rm "$dockerImage" [ -e /opt/alfresco-solr/solr.in.sh ] || (echo "solr.in.sh does not exist" && exit 1)
docker run --rm "$dockerImage" grep -q Alfresco /opt/alfresco-solr/solr.in.sh || (echo "solr.in.sh does not contain Alfresco config" && exit 1)
docker run --rm "$dockerImage" grep -q Alfresco /opt/alfresco-solr/solr.in.cmd || (echo "solr.in.cmd does not contain Alfresco config" && exit 1)
docker run --rm "$dockerImage" grep -q Alfresco /opt/alfresco-solr/solr.in.cmd || (echo "solr.in.cmd does not containAlfresco config" && exit 1)
docker run --rm "$dockerImage" grep -q LOGS_DIR/log4j.properties /opt/alfresco-solr/solr.in.sh || (echo "solr.in.sh does not contain SOLR_LOG_LEVEL=WARN" && exit 1)
docker run --rm "$dockerImage" grep -q LOGS_DIR!\log4j.properties /opt/alfresco-solr/solr.in.cmd || (echo "solr.in.cmd does not contain SOLR_LOG_LEVEL=WARN " && exit 1)
docker run --rm "$dockerImage" [ -e /opt/alfresco-solr/solrhome/conf/shared.properties ] || (echo "shared.properties does not exist" && exit 1)
docker run --rm "$dockerImage" /opt/alfresco-solr/solr/bin/solr start
+4
View File
@@ -3,6 +3,10 @@ ${line.separator} <Set name="TrustStoreType"><Property name="solr.jetty.trustst
alfresco.search.ssl.token= <Set name="excludeProtocols">
alfresco.search.ssl.need.token=needClientAuth" default="false"
alfresco.search.ssl.need=needclientauth" default="true"
alfresco.search.logs=SOLR_LOGS_DIR=../../logs\
${line.separator}LOG4J_PROPS=$SOLR_LOGS_DIR/log4j.properties
alfresco.search.logs.win=set SOLR_LOGS_DIR=..\\..\\logs\
${line.separator}set LOG4J_PROPS=!SOLR_LOGS_DIR!\\log4j.properties
alfresco.search.config=# Alfresco configuration. This file is automatically included by solr. You can define your custom settings here\
${line.separator}SOLR_OPTS="$SOLR_OPTS -Dsolr.jetty.request.header.size=1000000 -Dsolr.jetty.threads.stop.timeout=300000"
alfresco.search.config.win=REM Alfresco configuration. This file is automatically included by solr. You can define your custom settings here\
+2 -2
View File
@@ -155,10 +155,10 @@
<replace token= "SOLR_SSL_OPTS=%SOLR_SSL_OPTS%" value="SOLR_SSL_OPTS=!SOLR_SSL_OPTS!" dir="target/solr-${solr.version}">
<include name="**/bin/solr.cmd"/>
</replace>
<replace token= "#SOLR_LOGS_DIR=logs" value="SOLR_LOGS_DIR=../../logs" dir="target/solr-${solr.version}">
<replace token= "#SOLR_LOGS_DIR=logs" value="${alfresco.search.logs}" dir="target/solr-${solr.version}">
<include name="**/bin/solr.in.sh"/>
</replace>
<replace token= "REM set SOLR_LOGS_DIR=logs" value="set SOLR_LOGS_DIR=..\..\logs" dir="target/solr-${solr.version}">
<replace token= "REM set SOLR_LOGS_DIR=logs" value="${alfresco.search.logs.win}" dir="target/solr-${solr.version}">
<include name="**/bin/solr.in.cmd"/>
</replace>
<replace token= "# Anything you add to the SOLR_OPTS" value="${alfresco.search.config}${line.separator}${line.separator}# Anything you add to the SOLR_OPTS" dir="target/solr-${solr.version}">
+2 -1
View File
@@ -1,2 +1,3 @@
#Log files are written to this directory.
#You can change the logfile location by setting SOLR_LOGS_DIR in solr.in.sh or solr.in.cmd (for windows)
#You can change most logging settings using the log4j.properties file found in this directory
#You can also change the logfile location by setting SOLR_LOGS_DIR in solr.in.sh or solr.in.cmd (for windows)