Home / Function/ initializeShouldApplyLogbackSystemPropertiesToTheContext() — spring-boot Function Reference

initializeShouldApplyLogbackSystemPropertiesToTheContext() — spring-boot Function Reference

Architecture documentation for the initializeShouldApplyLogbackSystemPropertiesToTheContext() function in LogbackLoggingSystemTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  0011acb7_da2e_5b58_e839_5c2a29bf46cd["initializeShouldApplyLogbackSystemPropertiesToTheContext()"]
  58d8d837_b5a1_09c5_cdb4_ff02e18c8c38["initialize()"]
  0011acb7_da2e_5b58_e839_5c2a29bf46cd -->|calls| 58d8d837_b5a1_09c5_cdb4_ff02e18c8c38
  cd4620eb_deae_3575_f645_e33d9aacf415["of()"]
  0011acb7_da2e_5b58_e839_5c2a29bf46cd -->|calls| cd4620eb_deae_3575_f645_e33d9aacf415
  982a114a_214f_5cfb_9a67_319f6e793671["getConsoleCharset()"]
  0011acb7_da2e_5b58_e839_5c2a29bf46cd -->|calls| 982a114a_214f_5cfb_9a67_319f6e793671
  501f40c7_eea3_8197_664f_2a7d4a9c3264["beforeInitialize()"]
  0011acb7_da2e_5b58_e839_5c2a29bf46cd -->|calls| 501f40c7_eea3_8197_664f_2a7d4a9c3264
  style 0011acb7_da2e_5b58_e839_5c2a29bf46cd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java lines 567–592

	@Test
	void initializeShouldApplyLogbackSystemPropertiesToTheContext() {
		this.environment.setProperty("logging.logback.rollingpolicy.file-name-pattern", "file-name-pattern");
		this.environment.setProperty("logging.logback.rollingpolicy.clean-history-on-start", "true");
		this.environment.setProperty("logging.logback.rollingpolicy.max-file-size", "10MB");
		this.environment.setProperty("logging.logback.rollingpolicy.total-size-cap", "100MB");
		this.environment.setProperty("logging.logback.rollingpolicy.max-history", "20");
		this.loggingSystem.beforeInitialize();
		initialize(this.initializationContext, null, null);
		LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
		Map<String, String> properties = loggerContext.getCopyOfPropertyMap();
		Set<String> expectedProperties = new HashSet<>();
		Stream.of(RollingPolicySystemProperty.values())
			.map(RollingPolicySystemProperty::getEnvironmentVariableName)
			.forEach(expectedProperties::add);
		Stream.of(LoggingSystemProperty.values())
			.map(LoggingSystemProperty::getEnvironmentVariableName)
			.forEach(expectedProperties::add);
		expectedProperties.removeAll(List.of("LOG_FILE", "LOG_PATH"));
		expectedProperties.add("org.jboss.logging.provider");
		expectedProperties.add("LOG_CORRELATION_PATTERN");
		expectedProperties.add("CONSOLE_LOG_STRUCTURED_FORMAT");
		expectedProperties.add("FILE_LOG_STRUCTURED_FORMAT");
		assertThat(properties).containsOnlyKeys(expectedProperties);
		assertThat(properties).containsEntry("CONSOLE_LOG_CHARSET", getConsoleCharset());
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does initializeShouldApplyLogbackSystemPropertiesToTheContext() do?
initializeShouldApplyLogbackSystemPropertiesToTheContext() is a function in the spring-boot codebase.
What does initializeShouldApplyLogbackSystemPropertiesToTheContext() call?
initializeShouldApplyLogbackSystemPropertiesToTheContext() calls 4 function(s): beforeInitialize, getConsoleCharset, initialize, of.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free