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>
|
<properties>
|
||||||
<java.version>11</java.version>
|
<java.version>11</java.version>
|
||||||
|
<logback-classic.version>1.2.11</logback-classic.version>
|
||||||
|
<slf4j-api.version>1.7.25</slf4j-api.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<prerequisites>
|
<prerequisites>
|
||||||
@@ -357,6 +359,23 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</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>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -38,10 +38,6 @@ import org.springframework.web.servlet.DispatcherServlet;
|
|||||||
})
|
})
|
||||||
public class Application extends SpringBootServletInitializer {
|
public class Application extends SpringBootServletInitializer {
|
||||||
|
|
||||||
static {
|
|
||||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
SpringApplication.run(Application.class, args);
|
SpringApplication.run(Application.class, args);
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|||||||
})
|
})
|
||||||
public class CustomBeanTest {
|
public class CustomBeanTest {
|
||||||
|
|
||||||
static {
|
|
||||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
some.custom.pkg1.CustomBean customBean1;
|
some.custom.pkg1.CustomBean customBean1;
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
|
|||||||
|
|
||||||
public class CustomInterceptorTest {
|
public class CustomInterceptorTest {
|
||||||
|
|
||||||
static {
|
|
||||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
|
||||||
}
|
|
||||||
|
|
||||||
@LocalServerPort
|
@LocalServerPort
|
||||||
private int port;
|
private int port;
|
||||||
|
|
||||||
|
|||||||
@@ -57,10 +57,6 @@ import org.testcontainers.elasticsearch.ElasticsearchContainer;
|
|||||||
})
|
})
|
||||||
@ContextConfiguration(initializers = ElasticsearchLastNR4IT.Initializer.class)
|
@ContextConfiguration(initializers = ElasticsearchLastNR4IT.Initializer.class)
|
||||||
public class ElasticsearchLastNR4IT {
|
public class ElasticsearchLastNR4IT {
|
||||||
static {
|
|
||||||
System.setProperty("org.springframework.boot.logging.LoggingSystem", "none");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private IGenericClient ourClient;
|
private IGenericClient ourClient;
|
||||||
private FhirContext ourCtx;
|
private FhirContext ourCtx;
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||||||
})
|
})
|
||||||
public class ExampleServerDstu2IT {
|
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 static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
|
||||||
private IGenericClient ourClient;
|
private IGenericClient ourClient;
|
||||||
private FhirContext ourCtx;
|
private FhirContext ourCtx;
|
||||||
|
|||||||
@@ -51,10 +51,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||||||
|
|
||||||
public class ExampleServerDstu3IT implements IServerSupport {
|
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 static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
|
||||||
private IGenericClient ourClient;
|
private IGenericClient ourClient;
|
||||||
private FhirContext ourCtx;
|
private FhirContext ourCtx;
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||||||
// when running in a spring boot environment
|
// when running in a spring boot environment
|
||||||
"spring.main.allow-bean-definition-overriding=true"})
|
"spring.main.allow-bean-definition-overriding=true"})
|
||||||
class ExampleServerR4BIT {
|
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 static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerR4BIT.class);
|
||||||
private IGenericClient ourClient;
|
private IGenericClient ourClient;
|
||||||
private FhirContext ourCtx;
|
private FhirContext ourCtx;
|
||||||
|
|||||||
@@ -43,11 +43,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||||||
// when running in a spring boot environment
|
// when running in a spring boot environment
|
||||||
"spring.main.allow-bean-definition-overriding=true" })
|
"spring.main.allow-bean-definition-overriding=true" })
|
||||||
class ExampleServerR4IT {
|
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 static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerR4IT.class);
|
||||||
private IGenericClient ourClient;
|
private IGenericClient ourClient;
|
||||||
private FhirContext ourCtx;
|
private FhirContext ourCtx;
|
||||||
|
|||||||
@@ -41,11 +41,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
|
|||||||
})
|
})
|
||||||
public class ExampleServerR5IT {
|
public class ExampleServerR5IT {
|
||||||
|
|
||||||
static {
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
|
||||||
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 IGenericClient ourClient;
|
||||||
private FhirContext ourCtx;
|
private FhirContext ourCtx;
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||||||
})
|
})
|
||||||
public class MultitenantServerR4IT {
|
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 static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
|
||||||
private IGenericClient ourClient;
|
private IGenericClient ourClient;
|
||||||
|
|||||||
Reference in New Issue
Block a user