|
27 | 27 | import io.qameta.allure.model.Parameter; |
28 | 28 | import io.qameta.allure.model.Status; |
29 | 29 | import io.qameta.allure.model.StatusDetails; |
30 | | -import org.slf4j.Logger; |
31 | 30 | import org.slf4j.LoggerFactory; |
32 | 31 |
|
33 | 32 | import java.io.ByteArrayOutputStream; |
@@ -96,7 +95,9 @@ public final class ResultsUtils { |
96 | 95 | public static final String FRAMEWORK_LABEL_NAME = "framework"; |
97 | 96 | public static final String LANGUAGE_LABEL_NAME = "language"; |
98 | 97 |
|
99 | | - private static final Logger LOGGER = LoggerFactory.getLogger(ResultsUtils.class); |
| 98 | + // We must not initialize the logger here. |
| 99 | + // See: https://github.com/allure-framework/allure-java/issues/962 |
| 100 | + // private static final Logger LOGGER = LoggerFactory.getLogger(ResultsUtils.class); |
100 | 101 | private static final String ALLURE_DESCRIPTIONS_PACKAGE = "allureDescriptions/"; |
101 | 102 | private static final String MD_5 = "MD5"; |
102 | 103 |
|
@@ -364,7 +365,7 @@ private static String getRealHostName() { |
364 | 365 | try { |
365 | 366 | cachedHost = InetAddress.getLocalHost().getHostName(); |
366 | 367 | } catch (UnknownHostException e) { |
367 | | - LOGGER.debug("Could not get host name", e); |
| 368 | + LoggerFactory.getLogger(ResultsUtils.class).debug("Could not get host name", e); |
368 | 369 | cachedHost = "default"; |
369 | 370 | } |
370 | 371 | } |
@@ -407,7 +408,7 @@ private static Optional<String> readResource(final ClassLoader classLoader, fina |
407 | 408 | final byte[] bytes = toBytes(is); |
408 | 409 | return Optional.of(new String(bytes, StandardCharsets.UTF_8)); |
409 | 410 | } catch (IOException e) { |
410 | | - LOGGER.warn("Unable to process description resource file", e); |
| 411 | + LoggerFactory.getLogger(ResultsUtils.class).warn("Unable to process description resource file", e); |
411 | 412 | } |
412 | 413 | return Optional.empty(); |
413 | 414 | } |
|
0 commit comments