Automatically disable banner when using structured logging
Closes gh-41659
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
spring.main.banner-mode=off
|
||||
logging.structured.format.console=ecs
|
||||
#---
|
||||
spring.config.activate.on-profile=custom
|
||||
|
||||
@@ -43,6 +43,12 @@ class SampleLog4j2StructuredLoggingApplicationTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldNotLogBanner(CapturedOutput output) {
|
||||
SampleLog4j2StructuredLoggingApplication.main(new String[0]);
|
||||
assertThat(output).doesNotContain(" :: Spring Boot :: ");
|
||||
}
|
||||
|
||||
@Test
|
||||
void json(CapturedOutput output) {
|
||||
SampleLog4j2StructuredLoggingApplication.main(new String[0]);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
spring.main.banner-mode=off
|
||||
logging.structured.format.console=ecs
|
||||
#---
|
||||
spring.config.activate.on-profile=custom
|
||||
|
||||
@@ -43,6 +43,12 @@ class SampleStructuredLoggingApplicationTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldNotLogBanner(CapturedOutput output) {
|
||||
SampleStructuredLoggingApplication.main(new String[0]);
|
||||
assertThat(output).doesNotContain(" :: Spring Boot :: ");
|
||||
}
|
||||
|
||||
@Test
|
||||
void json(CapturedOutput output) {
|
||||
SampleStructuredLoggingApplication.main(new String[0]);
|
||||
|
||||
Reference in New Issue
Block a user