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+"$@"}