use of com.blackducksoftware.integration.hub.detect.workflow.report.writer.FileReportWriter 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();
}
Aggregations