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:
Luke deGruchy
2023-01-10 16:53:57 -05:00
parent d9f5e5c7da
commit 38ed00a84b
11 changed files with 20 additions and 41 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -41,11 +41,7 @@ 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 static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
private IGenericClient ourClient;
private FhirContext ourCtx;

View File

@@ -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;