Implement a new solution: Instead of static code blocks disabling logging, rollback slf4j-api, logback-classic, and logback-core to older versions. It's the addition of the rollback for slf4j-api that seems to restore logging.
This commit is contained in:
19
pom.xml
19
pom.xml
@@ -22,6 +22,8 @@
|
||||
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
<logback-classic.version>1.2.11</logback-classic.version>
|
||||
<slf4j-api.version>1.7.25</slf4j-api.version>
|
||||
</properties>
|
||||
|
||||
<prerequisites>
|
||||
@@ -357,6 +359,23 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j-api.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback-classic.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-core</artifactId>
|
||||
<version>${logback-classic.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -38,10 +38,6 @@ import org.springframework.web.servlet.DispatcherServlet;
|
||||
})
|
||||
public class Application extends SpringBootServletInitializer {
|
||||
|
||||
static {
|
||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication.run(Application.class, args);
|
||||
|
||||
@@ -13,10 +13,6 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
})
|
||||
public class CustomBeanTest {
|
||||
|
||||
static {
|
||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
||||
}
|
||||
|
||||
@Autowired
|
||||
some.custom.pkg1.CustomBean customBean1;
|
||||
|
||||
|
||||
@@ -23,10 +23,6 @@ import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
|
||||
|
||||
public class CustomInterceptorTest {
|
||||
|
||||
static {
|
||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
||||
}
|
||||
|
||||
@LocalServerPort
|
||||
private int port;
|
||||
|
||||
|
||||
@@ -57,10 +57,6 @@ import org.testcontainers.elasticsearch.ElasticsearchContainer;
|
||||
})
|
||||
@ContextConfiguration(initializers = ElasticsearchLastNR4IT.Initializer.class)
|
||||
public class ElasticsearchLastNR4IT {
|
||||
static {
|
||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
||||
}
|
||||
|
||||
|
||||
private IGenericClient ourClient;
|
||||
private FhirContext ourCtx;
|
||||
|
||||
@@ -23,10 +23,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
})
|
||||
public class ExampleServerDstu2IT {
|
||||
|
||||
static {
|
||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
||||
}
|
||||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
|
||||
private IGenericClient ourClient;
|
||||
private FhirContext ourCtx;
|
||||
|
||||
@@ -51,10 +51,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class ExampleServerDstu3IT implements IServerSupport {
|
||||
|
||||
static {
|
||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
||||
}
|
||||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
|
||||
private IGenericClient ourClient;
|
||||
private FhirContext ourCtx;
|
||||
|
||||
@@ -25,10 +25,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
// when running in a spring boot environment
|
||||
"spring.main.allow-bean-definition-overriding=true"})
|
||||
class ExampleServerR4BIT {
|
||||
|
||||
static {
|
||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
||||
}
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerR4BIT.class);
|
||||
private IGenericClient ourClient;
|
||||
private FhirContext ourCtx;
|
||||
|
||||
@@ -43,11 +43,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
// when running in a spring boot environment
|
||||
"spring.main.allow-bean-definition-overriding=true" })
|
||||
class ExampleServerR4IT {
|
||||
|
||||
static {
|
||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
||||
}
|
||||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerR4IT.class);
|
||||
private IGenericClient ourClient;
|
||||
private FhirContext ourCtx;
|
||||
|
||||
@@ -41,10 +41,6 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
})
|
||||
public class ExampleServerR5IT {
|
||||
|
||||
static {
|
||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
||||
}
|
||||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
|
||||
private IGenericClient ourClient;
|
||||
private FhirContext ourCtx;
|
||||
|
||||
@@ -28,9 +28,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
})
|
||||
public class MultitenantServerR4IT {
|
||||
|
||||
static {
|
||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
||||
}
|
||||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
|
||||
private IGenericClient ourClient;
|
||||
|
||||
Reference in New Issue
Block a user