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

testFilePatternProperty() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  9e45d086_b1ed_b366_b997_7a5e651e4b36["testFilePatternProperty()"]
  1c70a669_b986_1d08_11e5_0f5b58ad7e27["LoggingInitializationContext()"]
  9e45d086_b1ed_b366_b997_7a5e651e4b36 -->|calls| 1c70a669_b986_1d08_11e5_0f5b58ad7e27
  13cca41d_e6d4_6c55_4166_597017d5c02e["tmpDir()"]
  9e45d086_b1ed_b366_b997_7a5e651e4b36 -->|calls| 13cca41d_e6d4_6c55_4166_597017d5c02e
  bc937c1c_ec1c_7511_0eee_c35de09ea03e["getLogFile()"]
  9e45d086_b1ed_b366_b997_7a5e651e4b36 -->|calls| bc937c1c_ec1c_7511_0eee_c35de09ea03e
  58d8d837_b5a1_09c5_cdb4_ff02e18c8c38["initialize()"]
  9e45d086_b1ed_b366_b997_7a5e651e4b36 -->|calls| 58d8d837_b5a1_09c5_cdb4_ff02e18c8c38
  599de821_15df_43cf_ef7e_1637f660f37b["getLineWithText()"]
  9e45d086_b1ed_b366_b997_7a5e651e4b36 -->|calls| 599de821_15df_43cf_ef7e_1637f660f37b
  style 9e45d086_b1ed_b366_b997_7a5e651e4b36 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

	@Test
	void testFilePatternProperty(CapturedOutput output) {
		this.environment.setProperty("logging.pattern.file", "%logger %msg");
		LoggingInitializationContext loggingInitializationContext = new LoggingInitializationContext(this.environment);
		File file = new File(tmpDir(), "logback-test.log");
		LogFile logFile = getLogFile(file.getPath(), null);
		initialize(loggingInitializationContext, null, logFile);
		this.logger.info("Hello world");
		assertThat(getLineWithText(output, "Hello world")).contains("INFO");
		assertThat(getLineWithText(file, "Hello world")).doesNotContain("INFO");
	}

Domain

Subdomains

Frequently Asked Questions

What does testFilePatternProperty() do?
testFilePatternProperty() is a function in the spring-boot codebase.
What does testFilePatternProperty() call?
testFilePatternProperty() calls 5 function(s): LoggingInitializationContext, getLineWithText, getLogFile, initialize, tmpDir.

Analyze Your Own Codebase

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

Try Supermodel Free