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

testNonDefaultConfigLocation() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  60825604_93e4_3521_a266_9abd92c93b38["testNonDefaultConfigLocation()"]
  bffa5cc2_2336_d219_9e81_a81a831f09b1["initialize()"]
  60825604_93e4_3521_a266_9abd92c93b38 -->|calls| bffa5cc2_2336_d219_9e81_a81a831f09b1
  bc937c1c_ec1c_7511_0eee_c35de09ea03e["getLogFile()"]
  60825604_93e4_3521_a266_9abd92c93b38 -->|calls| bc937c1c_ec1c_7511_0eee_c35de09ea03e
  13cca41d_e6d4_6c55_4166_597017d5c02e["tmpDir()"]
  60825604_93e4_3521_a266_9abd92c93b38 -->|calls| 13cca41d_e6d4_6c55_4166_597017d5c02e
  501f40c7_eea3_8197_664f_2a7d4a9c3264["beforeInitialize()"]
  60825604_93e4_3521_a266_9abd92c93b38 -->|calls| 501f40c7_eea3_8197_664f_2a7d4a9c3264
  style 60825604_93e4_3521_a266_9abd92c93b38 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

	@Test
	@WithNonDefaultXmlResource
	void testNonDefaultConfigLocation(CapturedOutput output) {
		this.loggingSystem.beforeInitialize();
		this.loggingSystem.initialize(this.initializationContext, "classpath:nondefault.xml",
				getLogFile(tmpDir() + "/tmp.log", null));
		this.logger.info("Hello world");
		Configuration configuration = this.loggingSystem.getConfiguration();
		assertThat(output).contains("Hello world").contains(tmpDir() + "/tmp.log");
		assertThat(new File(tmpDir() + "/tmp.log")).doesNotExist();
		assertThat(configuration.getConfigurationSource().getFile().getAbsolutePath()).contains("nondefault.xml");
		assertThat(configuration.getWatchManager().getIntervalSeconds()).isEqualTo(30);
	}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free