use of com.blackducksoftware.integration.hub.detect.workflow.report.writer.InfoLogReportWriter in project hub-detect by blackducksoftware.
the class DiagnosticReportHandler method createReportWriter.
private ReportWriter createReportWriter(final ReportTypes reportType) {
try {
final File reportFile = new File(reportDirectory, reportType.getReportFileName() + ".txt");
final FileReportWriter fileReportWriter = new FileReportWriter(reportFile, reportType.getReportTitle(), reportType.getReportDescription(), runId);
reportWriters.put(reportType, fileReportWriter);
logger.info("Created report file: " + reportFile.getPath());
return fileReportWriter;
} catch (final Exception e) {
logger.error("Failed to create report writer: " + reportType.toString(), e);
}
return new InfoLogReportWriter();
}
use of com.blackducksoftware.integration.hub.detect.workflow.report.writer.InfoLogReportWriter in project hub-detect by blackducksoftware.
the class ExtractionManager method extract.
private void extract(final DetectorEvaluation result) {
// TODO: Replace reporting.
logger.info("Starting extraction: " + result.getDetector().getDetectorType() + " - " + result.getDetector().getName());
logger.info("Identifier: " + result.getExtractionId().toUniqueString());
ObjectPrinter.printObjectPrivate(new InfoLogReportWriter(), result.getDetector());
logger.info(ReportConstants.SEPERATOR);
try {
result.setExtraction(result.getDetector().extract(result.getExtractionId()));
} catch (final Exception e) {
result.setExtraction(new Extraction.Builder().exception(e).build());
}
logger.info(ReportConstants.SEPERATOR);
logger.info("Finished extraction: " + result.getExtraction().result.toString());
logger.info("Code locations found: " + result.getExtraction().codeLocations.size());
if (result.getExtraction().result == ExtractionResultType.EXCEPTION) {
logger.error("Exception:", result.getExtraction().error);
} else if (result.getExtraction().result == ExtractionResultType.FAILURE) {
logger.info(result.getExtraction().description);
}
logger.info(ReportConstants.SEPERATOR);
}
use of com.blackducksoftware.integration.hub.detect.workflow.report.writer.InfoLogReportWriter in project hub-detect by blackducksoftware.
the class BootManager method printConfiguration.
private void printConfiguration(boolean fullConfiguration, List<DetectOption> detectOptions) {
DetectConfigurationReporter detectConfigurationReporter = new DetectConfigurationReporter();
InfoLogReportWriter infoLogReportWriter = new InfoLogReportWriter();
if (!fullConfiguration) {
detectConfigurationReporter.print(infoLogReportWriter, detectOptions);
}
detectConfigurationReporter.printWarnings(infoLogReportWriter, detectOptions);
}
Aggregations