]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-22676 replace StatusPrinter by StatusPrinter2
authorSteve Marion <steve.marion@sonarsource.com>
Fri, 23 Aug 2024 08:50:28 +0000 (10:50 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 23 Aug 2024 20:02:33 +0000 (20:02 +0000)
sonar-core/src/main/java/org/sonar/core/config/Logback.java

index c327b2a2fa4b2aeed7c5dfd21bf6916524376a5d..593bc6079a52d093180ee39cf2d1ac4473ad4665 100644 (file)
@@ -22,7 +22,7 @@ package org.sonar.core.config;
 import ch.qos.logback.classic.LoggerContext;
 import ch.qos.logback.classic.joran.JoranConfigurator;
 import ch.qos.logback.core.joran.spi.JoranException;
-import ch.qos.logback.core.util.StatusPrinter;
+import ch.qos.logback.core.util.StatusPrinter2;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -39,6 +39,8 @@ import org.slf4j.LoggerFactory;
  */
 public class Logback {
 
+  private static final StatusPrinter2 statusPrinter = new StatusPrinter2();
+
   private Logback() {
     // only statics
   }
@@ -74,7 +76,7 @@ public class Logback {
     } finally {
       IOUtils.closeQuietly(input);
     }
-    StatusPrinter.printInCaseOfErrorsOrWarnings(lc);
+    statusPrinter.printInCaseOfErrorsOrWarnings(lc);
   }
 
   private static LoggerContext configureContext(LoggerContext context, Map<String, String> substitutionVariables) {