From 81cb6309cecaff8602b839601abec99f2f1fbfea Mon Sep 17 00:00:00 2001 From: vdelendik Date: Tue, 15 Feb 2022 15:13:56 +0300 Subject: [PATCH] declared valid loggers --- .../carina/core/foundation/cucumber/CucumberBaseTest.java | 4 ++++ .../carina/core/foundation/cucumber/CucumberRunner.java | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/qaprosoft/carina/core/foundation/cucumber/CucumberBaseTest.java b/src/main/java/com/qaprosoft/carina/core/foundation/cucumber/CucumberBaseTest.java index fdbca0e..2f83966 100644 --- a/src/main/java/com/qaprosoft/carina/core/foundation/cucumber/CucumberBaseTest.java +++ b/src/main/java/com/qaprosoft/carina/core/foundation/cucumber/CucumberBaseTest.java @@ -15,11 +15,14 @@ *******************************************************************************/ package com.qaprosoft.carina.core.foundation.cucumber; +import java.lang.invoke.MethodHandles; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.events.EventFiringWebDriver; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.qaprosoft.carina.core.foundation.webdriver.CarinaDriver; import com.qaprosoft.carina.core.foundation.webdriver.Screenshot; @@ -30,6 +33,7 @@ public class CucumberBaseTest extends CucumberRunner { + private static final Logger LOGGER = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); /** * Check is it Cucumber Test or not. diff --git a/src/main/java/com/qaprosoft/carina/core/foundation/cucumber/CucumberRunner.java b/src/main/java/com/qaprosoft/carina/core/foundation/cucumber/CucumberRunner.java index 12a5877..d89a598 100644 --- a/src/main/java/com/qaprosoft/carina/core/foundation/cucumber/CucumberRunner.java +++ b/src/main/java/com/qaprosoft/carina/core/foundation/cucumber/CucumberRunner.java @@ -17,6 +17,7 @@ import java.io.File; import java.io.FilenameFilter; +import java.lang.invoke.MethodHandles; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -27,7 +28,8 @@ import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.testng.ITestContext; import org.testng.annotations.AfterClass; import org.testng.annotations.DataProvider; @@ -47,6 +49,8 @@ import net.masterthought.cucumber.ReportBuilder; public abstract class CucumberRunner extends AbstractTest { + private static final Logger LOGGER = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + private TestNGCucumberRunner testNGCucumberRunner; private final static String STR_FORMAT_TEST_NAME = "%s (%s)"; @@ -60,8 +64,6 @@ public abstract class CucumberRunner extends AbstractTest { private final static String ZAFIRA_REPORT_CI = "ZafiraReport"; private final static String CUCUMBER_REPORT_CI = "CucumberReport"; - protected static final Logger LOGGER = Logger.getLogger(CucumberRunner.class); - List testNamesList = Collections.synchronizedList(new ArrayList()); public CucumberRunner() {