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

getLoggerConfigurationWhenHasCustomLevel() — spring-boot Function Reference

Architecture documentation for the getLoggerConfigurationWhenHasCustomLevel() function in Log4J2LoggingSystemTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  d4dd22e2_4f31_6578_bc9a_47fb8f6045a2["getLoggerConfigurationWhenHasCustomLevel()"]
  bffa5cc2_2336_d219_9e81_a81a831f09b1["initialize()"]
  d4dd22e2_4f31_6578_bc9a_47fb8f6045a2 -->|calls| bffa5cc2_2336_d219_9e81_a81a831f09b1
  9519ed59_465e_41a6_0d10_16e0e71a34a1["getLoggerConfiguration()"]
  d4dd22e2_4f31_6578_bc9a_47fb8f6045a2 -->|calls| 9519ed59_465e_41a6_0d10_16e0e71a34a1
  cee065ad_fd57_b33f_46df_bac2e8a2f38b["getLevelConfiguration()"]
  d4dd22e2_4f31_6578_bc9a_47fb8f6045a2 -->|calls| cee065ad_fd57_b33f_46df_bac2e8a2f38b
  501f40c7_eea3_8197_664f_2a7d4a9c3264["beforeInitialize()"]
  d4dd22e2_4f31_6578_bc9a_47fb8f6045a2 -->|calls| 501f40c7_eea3_8197_664f_2a7d4a9c3264
  5442b6c9_c948_65c9_3b32_df1993add6a2["getName()"]
  d4dd22e2_4f31_6578_bc9a_47fb8f6045a2 -->|calls| 5442b6c9_c948_65c9_3b32_df1993add6a2
  style d4dd22e2_4f31_6578_bc9a_47fb8f6045a2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java lines 233–244

	@Test // gh-35227
	void getLoggerConfigurationWhenHasCustomLevel() {
		this.loggingSystem.beforeInitialize();
		this.loggingSystem.initialize(this.initializationContext, null, null);
		LoggerContext loggerContext = this.loggingSystem.getLoggerContext();
		String loggerName = getClass().getName();
		org.apache.logging.log4j.Level level = org.apache.logging.log4j.Level.forName("CUSTOM_LEVEL", 1000);
		loggerContext.getConfiguration().addLogger(loggerName, new LoggerConfig(loggerName, level, true));
		LoggerConfiguration configuration = this.loggingSystem.getLoggerConfiguration(loggerName);
		assertThat(configuration).isNotNull();
		assertThat(configuration.getLevelConfiguration().getName()).isEqualTo("CUSTOM_LEVEL");
	}

Domain

Subdomains

Frequently Asked Questions

What does getLoggerConfigurationWhenHasCustomLevel() do?
getLoggerConfigurationWhenHasCustomLevel() is a function in the spring-boot codebase.
What does getLoggerConfigurationWhenHasCustomLevel() call?
getLoggerConfigurationWhenHasCustomLevel() calls 5 function(s): beforeInitialize, getLevelConfiguration, getLoggerConfiguration, getName, initialize.

Analyze Your Own Codebase

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

Try Supermodel Free