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

initializeSystem() — spring-boot Function Reference

Architecture documentation for the initializeSystem() function in LoggingApplicationListener.java from the spring-boot codebase.

Function java GradlePlugin AotProcessing calls 3 called by 1

Entity Profile

Dependency Diagram

graph TD
  afc95fcb_81d4_79b0_719a_f1b54e2b3353["initializeSystem()"]
  81d3722d_c4b6_44b8_92ad_5eddf72c432c["initialize()"]
  81d3722d_c4b6_44b8_92ad_5eddf72c432c -->|calls| afc95fcb_81d4_79b0_719a_f1b54e2b3353
  1c70a669_b986_1d08_11e5_0f5b58ad7e27["LoggingInitializationContext()"]
  afc95fcb_81d4_79b0_719a_f1b54e2b3353 -->|calls| 1c70a669_b986_1d08_11e5_0f5b58ad7e27
  838f8cec_6e1d_8c11_4c31_ea1a8706d453["ignoreLogConfig()"]
  afc95fcb_81d4_79b0_719a_f1b54e2b3353 -->|calls| 838f8cec_6e1d_8c11_4c31_ea1a8706d453
  81d3722d_c4b6_44b8_92ad_5eddf72c432c["initialize()"]
  afc95fcb_81d4_79b0_719a_f1b54e2b3353 -->|calls| 81d3722d_c4b6_44b8_92ad_5eddf72c432c
  style afc95fcb_81d4_79b0_719a_f1b54e2b3353 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java lines 328–354

	private void initializeSystem(ConfigurableEnvironment environment, LoggingSystem system,
			@Nullable LogFile logFile) {
		String logConfig = environment.getProperty(CONFIG_PROPERTY);
		if (StringUtils.hasLength(logConfig)) {
			logConfig = logConfig.strip();
		}
		try {
			LoggingInitializationContext initializationContext = new LoggingInitializationContext(environment);
			if (ignoreLogConfig(logConfig)) {
				system.initialize(initializationContext, null, logFile);
			}
			else {
				system.initialize(initializationContext, logConfig, logFile);
			}
		}
		catch (Throwable ex) {
			Throwable exceptionToReport = ex;
			while (exceptionToReport != null && !(exceptionToReport instanceof FileNotFoundException)) {
				exceptionToReport = exceptionToReport.getCause();
			}
			exceptionToReport = (exceptionToReport != null) ? exceptionToReport : ex;
			// NOTE: We can't use the logger here to report the problem
			System.err.println("Logging system failed to initialize using configuration from '" + logConfig + "'");
			exceptionToReport.printStackTrace(System.err);
			throw new IllegalStateException(ex);
		}
	}

Domain

Subdomains

Called By

Frequently Asked Questions

What does initializeSystem() do?
initializeSystem() is a function in the spring-boot codebase.
What does initializeSystem() call?
initializeSystem() calls 3 function(s): LoggingInitializationContext, ignoreLogConfig, initialize.
What calls initializeSystem()?
initializeSystem() is called by 1 function(s): initialize.

Analyze Your Own Codebase

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

Try Supermodel Free