From 237a382ca6289edc339e3ef3df10998efe43ad7f Mon Sep 17 00:00:00 2001 From: Jens Giehl Date: Fri, 20 Dec 2024 22:46:21 +0100 Subject: [PATCH] Replace deprecated getLog() with slf4j logger (#287) --- .../cucumber/CucumberReportGeneratorMojo.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/masterthought/cucumber/CucumberReportGeneratorMojo.java b/src/main/java/net/masterthought/cucumber/CucumberReportGeneratorMojo.java index 18a3581..8a80889 100644 --- a/src/main/java/net/masterthought/cucumber/CucumberReportGeneratorMojo.java +++ b/src/main/java/net/masterthought/cucumber/CucumberReportGeneratorMojo.java @@ -20,6 +20,8 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.codehaus.plexus.util.DirectoryScanner; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Goal which generates a Cucumber Report. @@ -27,6 +29,8 @@ @Mojo(name = "generate", defaultPhase = LifecyclePhase.VERIFY) public class CucumberReportGeneratorMojo extends AbstractMojo { + private static final Logger LOGGER = LoggerFactory.getLogger(CucumberReportGeneratorMojo.class); + /** * Name of the project. */ @@ -170,7 +174,7 @@ public class CucumberReportGeneratorMojo extends AbstractMojo { public void execute() throws MojoExecutionException { if (skip) { - getLog().info("Cucumber report generation is skipped."); + LOGGER.info("Cucumber report generation is skipped."); return; } @@ -232,7 +236,7 @@ public void execute() throws MojoExecutionException { } ReportBuilder reportBuilder = new ReportBuilder(jsonFilesToProcess, configuration); - getLog().info("About to generate Cucumber report."); + LOGGER.info("About to generate Cucumber report."); Reportable report = reportBuilder.generateReports(); if (checkBuildResult && (report == null || report.getFailedSteps() > 0 ||