public static class SolrCLI.UtilsTool extends SolrCLI.ToolBase
stdout, verbose| Constructor and Description | 
|---|
UtilsTool()  | 
UtilsTool(PrintStream stdout)  | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
archiveConsoleLogs()
Moves console log(s) into archiced/ 
 | 
int | 
archiveGcLogs()
Moves gc logs into archived/ 
 | 
String | 
getName()  | 
org.apache.commons.cli.Option[] | 
getOptions()  | 
int | 
removeOldSolrLogs(int daysToKeep)
Deletes time-stamped old solr logs, if older than n days 
 | 
int | 
rotateSolrLogs(int generations)
Rotates solr.log before starting Solr. 
 | 
protected void | 
runImpl(org.apache.commons.cli.CommandLine cli)  | 
int | 
runTool(org.apache.commons.cli.CommandLine cli)  | 
void | 
setLogPath(Path logsPath)  | 
void | 
setQuiet(boolean shouldPrintStdout)  | 
void | 
setServerPath(Path serverPath)  | 
echo, echoIfVerbosepublic UtilsTool()
public UtilsTool(PrintStream stdout)
public String getName()
public org.apache.commons.cli.Option[] getOptions()
public int runTool(org.apache.commons.cli.CommandLine cli)
            throws Exception
runTool in interface SolrCLI.ToolrunTool in class SolrCLI.ToolBaseExceptionpublic int archiveGcLogs()
                  throws Exception
Exception - on failurepublic int archiveConsoleLogs()
                       throws Exception
Exception - on failurepublic int rotateSolrLogs(int generations)
                   throws Exception
solr.log.9 (and higher) are deleted solr.log.8 -> solr.log.9 solr.log.7 -> solr.log.8 ... solr.log -> solr.log.1
generations - number of generations to keep. Should agree with setting in log4j2.xmlException - if problemspublic int removeOldSolrLogs(int daysToKeep)
                      throws Exception
daysToKeep - number of days logs to keep before deletingException - on failureprotected void runImpl(org.apache.commons.cli.CommandLine cli)
                throws Exception
runImpl in class SolrCLI.ToolBaseExceptionpublic void setLogPath(Path logsPath)
public void setServerPath(Path serverPath)
public void setQuiet(boolean shouldPrintStdout)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.