|
|
|
|
@ -206,7 +206,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
@@ -206,7 +206,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void getLoggingConfigurations() { |
|
|
|
|
void getLoggerConfigurations() { |
|
|
|
|
this.loggingSystem.beforeInitialize(); |
|
|
|
|
this.loggingSystem.initialize(this.initializationContext, null, null); |
|
|
|
|
this.loggingSystem.setLogLevel(getClass().getName(), LogLevel.DEBUG); |
|
|
|
|
@ -216,7 +216,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
@@ -216,7 +216,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void getLoggingConfigurationsShouldReturnAllLoggers() { |
|
|
|
|
void getLoggerConfigurationsShouldReturnAllLoggers() { |
|
|
|
|
LogManager.getLogger("org.springframework.boot.logging.log4j2.Log4J2LoggingSystemTests$Nested"); |
|
|
|
|
this.loggingSystem.beforeInitialize(); |
|
|
|
|
this.loggingSystem.initialize(this.initializationContext, null, null); |
|
|
|
|
@ -233,7 +233,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
@@ -233,7 +233,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test // gh-35227
|
|
|
|
|
void getLoggingConfigurationsWhenHasCustomLevel() { |
|
|
|
|
void getLoggerConfigurationWhenHasCustomLevel() { |
|
|
|
|
this.loggingSystem.beforeInitialize(); |
|
|
|
|
this.loggingSystem.initialize(this.initializationContext, null, null); |
|
|
|
|
LoggerContext loggerContext = (LoggerContext) LogManager.getContext(false); |
|
|
|
|
@ -250,7 +250,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
@@ -250,7 +250,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void getLoggingConfiguration() { |
|
|
|
|
void getLoggerConfiguration() { |
|
|
|
|
this.loggingSystem.beforeInitialize(); |
|
|
|
|
this.loggingSystem.initialize(this.initializationContext, null, null); |
|
|
|
|
this.loggingSystem.setLogLevel(getClass().getName(), LogLevel.DEBUG); |
|
|
|
|
@ -260,7 +260,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
@@ -260,7 +260,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void getLoggingConfigurationShouldReturnLoggerWithNullConfiguredLevel() { |
|
|
|
|
void getLoggerConfigurationShouldReturnLoggerWithNullConfiguredLevel() { |
|
|
|
|
this.loggingSystem.beforeInitialize(); |
|
|
|
|
this.loggingSystem.initialize(this.initializationContext, null, null); |
|
|
|
|
this.loggingSystem.setLogLevel(getClass().getName(), LogLevel.DEBUG); |
|
|
|
|
@ -269,7 +269,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
@@ -269,7 +269,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void getLoggingConfigurationForNonExistentLoggerShouldReturnNull() { |
|
|
|
|
void getLoggerConfigurationForNonExistentLoggerShouldReturnNull() { |
|
|
|
|
this.loggingSystem.beforeInitialize(); |
|
|
|
|
this.loggingSystem.initialize(this.initializationContext, null, null); |
|
|
|
|
this.loggingSystem.setLogLevel(getClass().getName(), LogLevel.DEBUG); |
|
|
|
|
@ -404,7 +404,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
@@ -404,7 +404,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void getLoggingConfigurationWithResetLevelReturnsNull() { |
|
|
|
|
void getLoggerConfigurationWithResetLevelReturnsNull() { |
|
|
|
|
this.loggingSystem.beforeInitialize(); |
|
|
|
|
this.loggingSystem.initialize(this.initializationContext, null, null); |
|
|
|
|
this.loggingSystem.setLogLevel("com.example", LogLevel.WARN); |
|
|
|
|
@ -418,7 +418,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
@@ -418,7 +418,7 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void getLoggingConfigurationWithResetLevelWhenAlreadyConfiguredReturnsParentConfiguredLevel() { |
|
|
|
|
void getLoggerConfigurationWithResetLevelWhenAlreadyConfiguredReturnsParentConfiguredLevel() { |
|
|
|
|
LoggerContext loggerContext = (LoggerContext) LogManager.getContext(false); |
|
|
|
|
this.loggingSystem.beforeInitialize(); |
|
|
|
|
this.loggingSystem.initialize(this.initializationContext, null, null); |
|
|
|
|
|