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

logbackDebugPropertyIsHonored() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  5e9f38e3_9eb7_3638_8ce7_3fa399d60aaf["logbackDebugPropertyIsHonored()"]
  13cca41d_e6d4_6c55_4166_597017d5c02e["tmpDir()"]
  5e9f38e3_9eb7_3638_8ce7_3fa399d60aaf -->|calls| 13cca41d_e6d4_6c55_4166_597017d5c02e
  bc937c1c_ec1c_7511_0eee_c35de09ea03e["getLogFile()"]
  5e9f38e3_9eb7_3638_8ce7_3fa399d60aaf -->|calls| bc937c1c_ec1c_7511_0eee_c35de09ea03e
  58d8d837_b5a1_09c5_cdb4_ff02e18c8c38["initialize()"]
  5e9f38e3_9eb7_3638_8ce7_3fa399d60aaf -->|calls| 58d8d837_b5a1_09c5_cdb4_ff02e18c8c38
  501f40c7_eea3_8197_664f_2a7d4a9c3264["beforeInitialize()"]
  5e9f38e3_9eb7_3638_8ce7_3fa399d60aaf -->|calls| 501f40c7_eea3_8197_664f_2a7d4a9c3264
  style 5e9f38e3_9eb7_3638_8ce7_3fa399d60aaf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

	@Test
	void logbackDebugPropertyIsHonored(CapturedOutput output) {
		System.setProperty("logback.debug", "true");
		try {
			this.loggingSystem.beforeInitialize();
			LoggerContext loggerContext = this.logger.getLoggerContext();
			StatusManager statusManager = loggerContext.getStatusManager();
			statusManager.add(new InfoStatus("INFO STATUS MESSAGE", getClass()));
			statusManager.add(new WarnStatus("WARN STATUS MESSAGE", getClass()));
			statusManager.add(new ErrorStatus("ERROR STATUS MESSAGE", getClass()));
			File file = new File(tmpDir(), "logback-test.log");
			LogFile logFile = getLogFile(file.getPath(), null);
			initialize(this.initializationContext, null, logFile);
			assertThat(output).contains("LevelChangePropagator")
				.contains("SizeAndTimeBasedFileNamingAndTriggeringPolicy")
				.contains("DebugLogbackConfigurator")
				.contains("INFO STATUS MESSAGE")
				.contains("WARN STATUS MESSAGE")
				.contains("ERROR STATUS MESSAGE");
			assertThat(loggerContext.getStatusManager().getCopyOfStatusListenerList()).allSatisfy((listener) -> {
				assertThat(listener).isInstanceOf(SystemStatusListener.class);
				assertThat(listener).hasFieldOrPropertyWithValue("debug", true);
			});
		}
		finally {
			System.clearProperty("logback.debug");
		}
	}

Domain

Subdomains

Frequently Asked Questions

What does logbackDebugPropertyIsHonored() do?
logbackDebugPropertyIsHonored() is a function in the spring-boot codebase.
What does logbackDebugPropertyIsHonored() call?
logbackDebugPropertyIsHonored() 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