You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2017/01/31 00:24:03 UTC

lucene-solr:branch_6x: SOLR-10043: Reduce logging of pre-start log rotation

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 59390ef76 -> a23951205


SOLR-10043: Reduce logging of pre-start log rotation

(cherry picked from commit 8782d26)


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

Branch: refs/heads/branch_6x
Commit: a2395120500fed76d016656032bf1f2eed725b9a
Parents: 59390ef
Author: Jan H�ydahl <ja...@apache.org>
Authored: Tue Jan 31 01:22:18 2017 +0100
Committer: Jan H�ydahl <ja...@apache.org>
Committed: Tue Jan 31 01:23:39 2017 +0100

----------------------------------------------------------------------
 solr/CHANGES.txt  |  2 ++
 solr/bin/solr     | 13 +++++++++----
 solr/bin/solr.cmd |  4 +++-
 3 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2395120/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index dcb55ec..9372dbd 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -75,6 +75,8 @@ Other Changes
 * SOLR-9983: Fixing NullPointerException failure by TestManagedSchemaThreadSafety 
   adding check for Zookeeper session expiration (Steve Rowe, Mikhail Khludnev)
 
+* SOLR-10043: Reduce logging of pre-start log rotation (janhoy)
+
 ==================  6.4.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2395120/solr/bin/solr
----------------------------------------------------------------------
diff --git a/solr/bin/solr b/solr/bin/solr
index ca5b8c6..7f154fc 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -1476,11 +1476,16 @@ if [ ! -e "$SOLR_HOME" ]; then
   echo -e "\nSolr home directory $SOLR_HOME not found!\n"
   exit 1
 fi
+if $verbose ; then
+  q=""
+else
+  q="-q"
+fi
 if [ "${SOLR_LOG_PRESTART_ROTATION:=true}" == "true" ]; then
-  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" -remove_old_solr_logs 7 || echo "Failed removing old solr logs"
-  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" -archive_gc_logs        || echo "Failed archiving old GC logs"
-  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" -archive_console_logs   || echo "Failed archiving old console logs"
-  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" -rotate_solr_logs 9     || echo "Failed rotating old solr logs"
+  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" $q -remove_old_solr_logs 7 || echo "Failed removing old solr logs"
+  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" $q -archive_gc_logs $q     || echo "Failed archiving old GC logs"
+  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" $q -archive_console_logs   || echo "Failed archiving old console logs"
+  run_tool utils -s "$DEFAULT_SERVER_DIR" -l "$SOLR_LOGS_DIR" $q -rotate_solr_logs 9     || echo "Failed rotating old solr logs"
 fi
 
 java_ver_out=`echo "$("$JAVA" -version 2>&1)"`

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2395120/solr/bin/solr.cmd
----------------------------------------------------------------------
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index 9237842..84192a4 100644
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -1215,10 +1215,12 @@ goto done
 
 :run_utils
 set "TOOL_CMD=%~1"
+set q="-q"
+IF "%verbose%"=="1"  set q=""
 "%JAVA%" %SOLR_SSL_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" ^
   -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^
   -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^
-  org.apache.solr.util.SolrCLI utils -s "%DEFAULT_SERVER_DIR%" -l "%SOLR_LOGS_DIR%" %TOOL_CMD%
+  org.apache.solr.util.SolrCLI utils -s "%DEFAULT_SERVER_DIR%" -l "%SOLR_LOGS_DIR%" %q:"=% %TOOL_CMD%
 if errorlevel 1 (
    exit /b 1
 )