From 6e6ce33a94eaa036b933f0a80d76b7e7c585c329 Mon Sep 17 00:00:00 2001 From: Shawn Heisey Date: Fri, 10 May 2013 22:29:30 +0000 Subject: [PATCH] SOLR-4807: zkcli fix for log4j and Windows git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1481220 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ solr/example/cloud-scripts/log4j.properties | 8 ++++++++ solr/example/cloud-scripts/zkcli.bat | 3 +-- solr/example/cloud-scripts/zkcli.sh | 3 +-- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 solr/example/cloud-scripts/log4j.properties diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index c96f13b1d51..72977e6ba7e 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -164,6 +164,9 @@ Bug Fixes * SOLR-4806: Shard splitting does not abort if WaitForState times out (shalin) +* SOLR-4807: The zkcli script now works with log4j. The zkcli.bat script + was broken on Windows in 4.3.0, now it works. (Shawn Heisey) + Other Changes ---------------------- diff --git a/solr/example/cloud-scripts/log4j.properties b/solr/example/cloud-scripts/log4j.properties new file mode 100644 index 00000000000..c5815839762 --- /dev/null +++ b/solr/example/cloud-scripts/log4j.properties @@ -0,0 +1,8 @@ +# Logging level +log4j.rootLogger=INFO, stderr + +# log to stderr +log4j.appender.stderr = org.apache.log4j.ConsoleAppender +log4j.appender.stderr.Target = System.err +log4j.appender.stderr.layout = org.apache.log4j.PatternLayout +log4j.appender.stderr.layout.ConversionPattern=%-5p - %d{yyyy-MM-dd HH:mm:ss.SSS}; %C; %m\n diff --git a/solr/example/cloud-scripts/zkcli.bat b/solr/example/cloud-scripts/zkcli.bat index 5857a3cf959..8232a726cac 100644 --- a/solr/example/cloud-scripts/zkcli.bat +++ b/solr/example/cloud-scripts/zkcli.bat @@ -8,5 +8,4 @@ REM Find location of this script set SDIR=%~dp0 if "%SDIR:~-1%"=="\" set SDIR=%SDIR:~0,-1% - -"%JVM%" -classpath "%SDIR%\..\solr-webapp\webapp\WEB-INF\lib\*;%SDIR%\..\lib\ext" org.apache.solr.cloud.ZkCLI %* +"%JVM%" -Dlog4j.configuration=file:%SDIR%\log4j.properties -classpath "%SDIR%\..\solr-webapp\webapp\WEB-INF\lib\*;%SDIR%\..\lib\ext\*" org.apache.solr.cloud.ZkCLI %* diff --git a/solr/example/cloud-scripts/zkcli.sh b/solr/example/cloud-scripts/zkcli.sh index 1a8f47723d7..ad68ef470b2 100644 --- a/solr/example/cloud-scripts/zkcli.sh +++ b/solr/example/cloud-scripts/zkcli.sh @@ -9,6 +9,5 @@ JVM="java" sdir="`dirname \"$0\"`" - -$JVM -classpath "$sdir/../solr-webapp/webapp/WEB-INF/lib/*:$sdir/../lib/ext/*" org.apache.solr.cloud.ZkCLI ${1+"$@"} +$JVM -Dlog4j.configuration=file:$sdir/log4j.properties -classpath "$sdir/../solr-webapp/webapp/WEB-INF/lib/*:$sdir/../lib/ext/*" org.apache.solr.cloud.ZkCLI ${1+"$@"}