Search in sources :

Example 1 with FileReportWriter

use of com.synopsys.integration.detect.workflow.report.writer.FileReportWriter in project synopsys-detect by blackducksoftware.

the class DiagnosticReportHandler method createReportWriter.

private ReportWriter createReportWriter(ReportTypes reportType) {
    try {
        File reportFile = new File(reportDirectory, reportType.getReportFileName() + ".txt");
        FileReportWriter fileReportWriter = new FileReportWriter(reportFile, reportType.getReportTitle(), reportType.getReportDescription(), runId);
        reportWriters.put(reportType, fileReportWriter);
        logger.info("Created report file: " + reportFile.getPath());
        return fileReportWriter;
    } catch (Exception e) {
        logger.error("Failed to create report writer: " + reportType.toString(), e);
    }
    return new InfoLogReportWriter();
}
Also used : InfoLogReportWriter(com.synopsys.integration.detect.workflow.report.writer.InfoLogReportWriter) FileReportWriter(com.synopsys.integration.detect.workflow.report.writer.FileReportWriter) File(java.io.File)

Aggregations

FileReportWriter (com.synopsys.integration.detect.workflow.report.writer.FileReportWriter)1 InfoLogReportWriter (com.synopsys.integration.detect.workflow.report.writer.InfoLogReportWriter)1 File (java.io.File)1