mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07:42 +00:00
Changed all of the commandline system.err to system.out
This commit is contained in:
parent
bc07a62e79
commit
ddd741b351
@ -141,7 +141,7 @@ public class CommandLineIngestManager extends CommandLineManager{
|
||||
|
||||
if (commands == null || commands.isEmpty()) {
|
||||
LOGGER.log(Level.SEVERE, "No command line commands specified");
|
||||
System.err.println("No command line commands specified");
|
||||
System.out.println("No command line commands specified");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ public class CommandLineIngestManager extends CommandLineManager{
|
||||
} catch (CaseActionException ex) {
|
||||
String baseCaseName = command.getInputs().get(CommandLineCommand.InputType.CASE_NAME.name());
|
||||
LOGGER.log(Level.SEVERE, "Error creating or opening case " + baseCaseName, ex);
|
||||
System.err.println("Error creating or opening case " + baseCaseName);
|
||||
System.out.println("Error creating or opening case " + baseCaseName);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
@ -195,7 +195,7 @@ public class CommandLineIngestManager extends CommandLineManager{
|
||||
} catch (InterruptedException | AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorException | CaseActionException ex) {
|
||||
String dataSourcePath = command.getInputs().get(CommandLineCommand.InputType.DATA_SOURCE_PATH.name());
|
||||
LOGGER.log(Level.SEVERE, "Error adding data source " + dataSourcePath, ex);
|
||||
System.err.println("Error adding data source " + dataSourcePath);
|
||||
System.out.println("Error adding data source " + dataSourcePath);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
@ -224,7 +224,7 @@ public class CommandLineIngestManager extends CommandLineManager{
|
||||
content = Case.getCurrentCaseThrows().getSleuthkitCase().getContentById(dataSourceObjId);
|
||||
} catch (TskCoreException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while trying to find data source with object ID " + dataSourceId, ex);
|
||||
System.err.println("Exception while trying to find data source with object ID " + dataSourceId);
|
||||
System.out.println("Exception while trying to find data source with object ID " + dataSourceId);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
@ -249,7 +249,7 @@ public class CommandLineIngestManager extends CommandLineManager{
|
||||
} catch (InterruptedException | CaseActionException ex) {
|
||||
String dataSourcePath = command.getInputs().get(CommandLineCommand.InputType.DATA_SOURCE_PATH.name());
|
||||
LOGGER.log(Level.SEVERE, "Error running ingest on data source " + dataSourcePath, ex);
|
||||
System.err.println("Error running ingest on data source " + dataSourcePath);
|
||||
System.out.println("Error running ingest on data source " + dataSourcePath);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
@ -272,7 +272,7 @@ public class CommandLineIngestManager extends CommandLineManager{
|
||||
} catch (CaseActionException ex) {
|
||||
String caseDirPath = command.getInputs().get(CommandLineCommand.InputType.CASE_FOLDER_PATH.name());
|
||||
LOGGER.log(Level.SEVERE, "Error opening case in case directory: " + caseDirPath, ex);
|
||||
System.err.println("Error opening case in case directory: " + caseDirPath);
|
||||
System.out.println("Error opening case in case directory: " + caseDirPath);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
@ -302,7 +302,7 @@ public class CommandLineIngestManager extends CommandLineManager{
|
||||
} catch (CaseActionException ex) {
|
||||
String caseDirPath = command.getInputs().get(CommandLineCommand.InputType.CASE_FOLDER_PATH.name());
|
||||
LOGGER.log(Level.SEVERE, "Error opening case in case directory: " + caseDirPath, ex);
|
||||
System.err.println("Error opening case in case directory: " + caseDirPath);
|
||||
System.out.println("Error opening case in case directory: " + caseDirPath);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
@ -320,14 +320,14 @@ public class CommandLineIngestManager extends CommandLineManager{
|
||||
* logged.
|
||||
*/
|
||||
LOGGER.log(Level.SEVERE, "Unexpected error", ex);
|
||||
System.err.println("Unexpected error. Exiting...");
|
||||
System.out.println("Unexpected error. Exiting...");
|
||||
|
||||
} finally {
|
||||
try {
|
||||
Case.closeCurrentCase();
|
||||
} catch (CaseActionException ex) {
|
||||
LOGGER.log(Level.WARNING, "Exception while closing case", ex);
|
||||
System.err.println("Exception while closing case");
|
||||
System.out.println("Exception while closing case");
|
||||
}
|
||||
}
|
||||
|
||||
@ -507,7 +507,7 @@ public class CommandLineIngestManager extends CommandLineManager{
|
||||
if (selectedProfile == null) {
|
||||
// unable to find the user specified profile
|
||||
LOGGER.log(Level.SEVERE, "Unable to find ingest profile: {0}. Ingest cancelled!", ingestProfileName);
|
||||
System.err.println("Unable to find ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
||||
System.out.println("Unable to find ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -516,7 +516,7 @@ public class CommandLineIngestManager extends CommandLineManager{
|
||||
if (selectedFileSet == null) {
|
||||
// unable to find the user specified profile
|
||||
LOGGER.log(Level.SEVERE, "Unable to find file filter {0} for ingest profile: {1}. Ingest cancelled!", new Object[]{selectedProfile.getFileIngestFilter(), ingestProfileName});
|
||||
System.err.println("Unable to find file filter " + selectedProfile.getFileIngestFilter() + " for ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
||||
System.out.println("Unable to find file filter " + selectedProfile.getFileIngestFilter() + " for ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ public class CommandLineOpenCaseManager extends CommandLineManager {
|
||||
|
||||
if (casePath == null || casePath.isEmpty()) {
|
||||
LOGGER.log(Level.SEVERE, "No command line commands specified");
|
||||
System.err.println("No command line commands specified");
|
||||
System.out.println("No command line commands specified");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ public class CommandLineOpenCaseManager extends CommandLineManager {
|
||||
LOGGER.log(Level.INFO, "Opening case at " + casePath);
|
||||
} catch (CaseActionException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Error opening case from command line ", ex);
|
||||
System.err.println("Error opening case ");
|
||||
System.out.println("Error opening case ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
|| values.containsKey(generateReportsOption))) {
|
||||
// not running from command line
|
||||
logger.log(Level.INFO, "No command line commands passed in as inputs. Not running from command line."); //NON-NLS
|
||||
System.err.println("No command line commands passed in as inputs. Not running from command line.");
|
||||
System.out.println("No command line commands passed in as inputs. Not running from command line.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -101,14 +101,14 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
argDirs = values.get(caseNameOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseName'");
|
||||
System.err.println("Missing argument 'caseName'");
|
||||
System.out.println("Missing argument 'caseName'");
|
||||
return;
|
||||
}
|
||||
inputCaseName = argDirs[0];
|
||||
|
||||
if (inputCaseName == null || inputCaseName.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "'caseName' argument is empty");
|
||||
System.err.println("'caseName' argument is empty");
|
||||
System.out.println("'caseName' argument is empty");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -119,26 +119,26 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseType'");
|
||||
System.err.println("Missing argument 'caseType'");
|
||||
System.out.println("Missing argument 'caseType'");
|
||||
return;
|
||||
}
|
||||
caseType = argDirs[0];
|
||||
|
||||
if (caseType == null || caseType.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "'caseType' argument is empty");
|
||||
System.err.println("'caseType' argument is empty");
|
||||
System.out.println("'caseType' argument is empty");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!caseType.equalsIgnoreCase(CASETYPE_MULTI) && !caseType.equalsIgnoreCase(CASETYPE_SINGLE)) {
|
||||
logger.log(Level.SEVERE, "'caseType' argument is invalid");
|
||||
System.err.println("'caseType' argument is invalid");
|
||||
System.out.println("'caseType' argument is invalid");
|
||||
return;
|
||||
}
|
||||
|
||||
if (caseType.equalsIgnoreCase(CASETYPE_MULTI) && !FeatureAccessUtils.canCreateMultiUserCases()) {
|
||||
logger.log(Level.SEVERE, "Unable to create multi user case.");
|
||||
System.err.println("Unable to create multi user case. Confirm that multi user settings are configured correctly.");
|
||||
System.out.println("Unable to create multi user case. Confirm that multi user settings are configured correctly.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -148,20 +148,20 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
argDirs = values.get(caseBaseDirOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseBaseDir'");
|
||||
System.err.println("Missing argument 'caseBaseDir'");
|
||||
System.out.println("Missing argument 'caseBaseDir'");
|
||||
return;
|
||||
}
|
||||
caseBaseDir = argDirs[0];
|
||||
|
||||
if (caseBaseDir == null || caseBaseDir.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseBaseDir'");
|
||||
System.err.println("Missing argument 'caseBaseDir'");
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseBaseDir' option");
|
||||
System.out.println("Missing argument 'caseBaseDir' option");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(new File(caseBaseDir).exists()) || !(new File(caseBaseDir).isDirectory())) {
|
||||
logger.log(Level.SEVERE, "''caseBaseDir'' {0} directory doesn''t exist or is not a directory", caseBaseDir);
|
||||
System.err.println("'caseBaseDir' directory doesn't exist or is not a directory: " + caseBaseDir);
|
||||
logger.log(Level.SEVERE, "'caseBaseDir' {0} directory doesn''t exist or is not a directory", caseBaseDir);
|
||||
System.out.println("'caseBaseDir' directory doesn't exist or is not a directory: " + caseBaseDir);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -172,7 +172,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
argDirs = values.get(dataSourcePathOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'dataSourcePath'");
|
||||
System.err.println("Missing argument 'dataSourcePath'");
|
||||
System.out.println("Missing argument 'dataSourcePath'");
|
||||
return;
|
||||
}
|
||||
dataSourcePath = argDirs[0];
|
||||
@ -180,13 +180,13 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
// verify inputs
|
||||
if (dataSourcePath == null || dataSourcePath.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'dataSourcePath'");
|
||||
System.err.println("Missing argument 'dataSourcePath'");
|
||||
System.out.println("Missing argument 'dataSourcePath'");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(new File(dataSourcePath).exists())) {
|
||||
logger.log(Level.SEVERE, "Input data source file {0} doesn''t exist", dataSourcePath);
|
||||
System.err.println("Input data source file " + dataSourcePath + " doesn't exist");
|
||||
System.out.println("Input data source file " + dataSourcePath + " doesn't exist");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -197,7 +197,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
argDirs = values.get(dataSourceObjectIdOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'dataSourceObjectIdOption'");
|
||||
System.err.println("Missing argument 'dataSourceObjectIdOption'");
|
||||
System.out.println("Missing argument 'dataSourceObjectIdOption'");
|
||||
return;
|
||||
}
|
||||
dataSourceId = argDirs[0];
|
||||
@ -205,7 +205,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
// verify inputs
|
||||
if (dataSourceId == null || dataSourceId.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "Input data source id is empty");
|
||||
System.err.println("Input data source id is empty");
|
||||
System.out.println("Input data source id is empty");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -215,22 +215,22 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
|
||||
argDirs = values.get(caseDirOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseDirOption'");
|
||||
System.err.println("Missing argument 'caseDirOption'");
|
||||
logger.log(Level.SEVERE, "Argument missing from 'caseDir' option");
|
||||
System.out.println("Argument missing from 'caseDir' option");
|
||||
return;
|
||||
}
|
||||
caseDir = argDirs[0];
|
||||
|
||||
// verify inputs
|
||||
if (caseDir == null || caseDir.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseDirOption'");
|
||||
System.err.println("Missing argument 'caseDirOption'");
|
||||
logger.log(Level.SEVERE, "Argument missing from 'caseDir'");
|
||||
System.out.println("Argument missing from 'caseDir'");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(new File(caseDir).exists()) || !(new File(caseDir).isDirectory())) {
|
||||
logger.log(Level.SEVERE, "Case directory {0} doesn''t exist or is not a directory", caseDir);
|
||||
System.err.println("Case directory " + caseDir + " doesn't exist or is not a directory");
|
||||
logger.log(Level.SEVERE, "Case directory {0} does not exist or is not a directory", caseDir);
|
||||
System.out.println("Case directory " + caseDir + " does not exist or is not a directory");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -240,8 +240,8 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
|
||||
argDirs = values.get(ingestProfileOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'ingestProfile'");
|
||||
System.err.println("Missing argument 'ingestProfile'");
|
||||
logger.log(Level.SEVERE, "Argument missing from 'ingestProfile' option");
|
||||
System.out.println("Argument missing from 'ingestProfile' option");
|
||||
return;
|
||||
}
|
||||
ingestProfile = argDirs[0];
|
||||
@ -249,7 +249,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
// verify inputs
|
||||
if (ingestProfile == null || ingestProfile.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'ingestProfile'");
|
||||
System.err.println("Missing argument 'ingestProfile'");
|
||||
System.out.println("Missing argument 'ingestProfile'");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -269,7 +269,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
// 'caseBaseDir' must always be specified for "CREATE_CASE" command
|
||||
if (caseBaseDir.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "'caseBaseDir' argument is empty");
|
||||
System.err.println("'caseBaseDir' argument is empty");
|
||||
System.out.println("'caseBaseDir' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
@ -289,7 +289,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
if (!values.containsKey(createCaseCommandOption) && caseDir.isEmpty()) {
|
||||
// new case is not being created during this run, so 'caseDir' should have been specified
|
||||
logger.log(Level.SEVERE, "'caseDir' argument is empty");
|
||||
System.err.println("'caseDir' argument is empty");
|
||||
System.out.println("'caseDir' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
@ -297,7 +297,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
// 'dataSourcePath' must always be specified for "ADD_DATA_SOURCE" command
|
||||
if (dataSourcePath.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "'dataSourcePath' argument is empty");
|
||||
System.err.println("'dataSourcePath' argument is empty");
|
||||
System.out.println("'dataSourcePath' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
@ -316,7 +316,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
if (!values.containsKey(createCaseCommandOption) && caseDir.isEmpty()) {
|
||||
// new case is not being created during this run, so 'caseDir' should have been specified
|
||||
logger.log(Level.SEVERE, "'caseDir' argument is empty");
|
||||
System.err.println("'caseDir' argument is empty");
|
||||
System.out.println("'caseDir' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
@ -325,7 +325,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
if (!values.containsKey(addDataSourceCommandOption) && dataSourceId.isEmpty()) {
|
||||
// data source is not being added during this run, so 'dataSourceId' should have been specified
|
||||
logger.log(Level.SEVERE, "'dataSourceId' argument is empty");
|
||||
System.err.println("'dataSourceId' argument is empty");
|
||||
System.out.println("'dataSourceId' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
@ -345,7 +345,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
if (!values.containsKey(createCaseCommandOption) && caseDir.isEmpty()) {
|
||||
// new case is not being created during this run, so 'caseDir' should have been specified
|
||||
logger.log(Level.SEVERE, "'caseDir' argument is empty");
|
||||
System.err.println("'caseDir' argument is empty");
|
||||
System.out.println("'caseDir' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
@ -364,7 +364,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
if (!values.containsKey(createCaseCommandOption) && caseDir.isEmpty()) {
|
||||
// new case is not being created during this run, so 'caseDir' should have been specified
|
||||
logger.log(Level.SEVERE, "'caseDir' argument is empty");
|
||||
System.err.println("'caseDir' argument is empty");
|
||||
System.out.println("'caseDir' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
@ -379,7 +379,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
// something is not right.
|
||||
if (reportProfile != null && reportProfile.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "'generateReports' argument is empty");
|
||||
System.err.println("'generateReports' argument is empty");
|
||||
System.out.println("'generateReports' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user