lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject [2/3] lucene-solr:branch_5x: SOLR-9047: zkcli should allow alternative locations for log4j configuration
Date Sat, 18 Jun 2016 01:01:37 GMT
SOLR-9047: zkcli should allow alternative locations for log4j configuration


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1eb30933
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1eb30933
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1eb30933

Branch: refs/heads/branch_5x
Commit: 1eb3093311682a2db108dd5e6d6f4aea52bee973
Parents: 7f72175
Author: Gregory Chanan <gchanan@cloudera.com>
Authored: Fri Apr 29 11:29:24 2016 -0700
Committer: Steve Rowe <sarowe@apache.org>
Committed: Fri Jun 17 20:59:22 2016 -0400

----------------------------------------------------------------------
 solr/CHANGES.txt                            | 2 ++
 solr/server/scripts/cloud-scripts/zkcli.bat | 8 +++++++-
 solr/server/scripts/cloud-scripts/zkcli.sh  | 9 +++++++--
 3 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1eb30933/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index faec8ce..d8f1321 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -34,6 +34,8 @@ Other Changes
 * SOLR-8677: Prevent shards containing invalid characters from being created.  Checks added
server-side
   and in SolrJ.  (Shai Erera, Jason Gerlowski, Anshum Gupta)
 
+* SOLR-9047: zkcli should allow alternative locations for log4j configuration (Gregory Chanan)
+
 ======================= 5.5.1 =======================
 
 Bug Fixes

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1eb30933/solr/server/scripts/cloud-scripts/zkcli.bat
----------------------------------------------------------------------
diff --git a/solr/server/scripts/cloud-scripts/zkcli.bat b/solr/server/scripts/cloud-scripts/zkcli.bat
index 6cec073..0e4359c 100644
--- a/solr/server/scripts/cloud-scripts/zkcli.bat
+++ b/solr/server/scripts/cloud-scripts/zkcli.bat
@@ -9,11 +9,17 @@ REM  Find location of this script
 set SDIR=%~dp0
 if "%SDIR:~-1%"=="\" set SDIR=%SDIR:~0,-1%
 
+if defined LOG4J_PROPS (
+  set "LOG4J_CONFIG=file:%LOG4J_PROPS%"
+) else (
+  set "LOG4J_CONFIG=file:%SDIR%\log4j.properties"
+)
+
 REM Settings for ZK ACL
 REM set SOLR_ZK_CREDS_AND_ACLS=-DzkACLProvider=org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider
^
 REM  -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider
^
 REM  -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD ^
 REM  -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD
 
-"%JVM%" %SOLR_ZK_CREDS_AND_ACLS% -Dlog4j.configuration="file:%SDIR%\log4j.properties" ^
+"%JVM%" %SOLR_ZK_CREDS_AND_ACLS% -Dlog4j.configuration="%LOG4J_CONFIG%" ^
 -classpath "%SDIR%\..\..\solr-webapp\webapp\WEB-INF\lib\*;%SDIR%\..\..\lib\ext\*" org.apache.solr.cloud.ZkCLI
%*

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1eb30933/solr/server/scripts/cloud-scripts/zkcli.sh
----------------------------------------------------------------------
diff --git a/solr/server/scripts/cloud-scripts/zkcli.sh b/solr/server/scripts/cloud-scripts/zkcli.sh
index 3c1120b..92f52e1 100755
--- a/solr/server/scripts/cloud-scripts/zkcli.sh
+++ b/solr/server/scripts/cloud-scripts/zkcli.sh
@@ -9,12 +9,17 @@ JVM="java"
 
 sdir="`dirname \"$0\"`"
 
+if [ -n "$LOG4J_PROPS" ]; then
+  log4j_config="file:$LOG4J_PROPS"
+else
+  log4j_config="file:$sdir/log4j.properties"
+fi
+
 # Settings for ZK ACL
 #SOLR_ZK_CREDS_AND_ACLS="-DzkACLProvider=org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider
\
 #  -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider
\
 #  -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD \
 #  -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD"
 
-PATH=$JAVA_HOME/bin:$PATH $JVM $SOLR_ZK_CREDS_AND_ACLS  -Dlog4j.configuration=file:$sdir/log4j.properties
\
+PATH=$JAVA_HOME/bin:$PATH $JVM $SOLR_ZK_CREDS_AND_ACLS  -Dlog4j.configuration=$log4j_config
\
 -classpath "$sdir/../../solr-webapp/webapp/WEB-INF/lib/*:$sdir/../../lib/ext/*" org.apache.solr.cloud.ZkCLI
${1+"$@"}
-


Mime
View raw message