correlationLoggingToFileWhenExpectCorrelationIdTrueAndMdcContent() — spring-boot Function Reference
Architecture documentation for the correlationLoggingToFileWhenExpectCorrelationIdTrueAndMdcContent() function in Log4J2LoggingSystemTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 843e96a9_e536_4564_00a1_4c4f374741aa["correlationLoggingToFileWhenExpectCorrelationIdTrueAndMdcContent()"] 67c73d2a_3c49_cb13_cad8_ad1d094d73d9["LoggingSystemProperties()"] 843e96a9_e536_4564_00a1_4c4f374741aa -->|calls| 67c73d2a_3c49_cb13_cad8_ad1d094d73d9 ce3696cf_77dd_9520_e3ee_8873df6cb400["apply()"] 843e96a9_e536_4564_00a1_4c4f374741aa -->|calls| ce3696cf_77dd_9520_e3ee_8873df6cb400 13cca41d_e6d4_6c55_4166_597017d5c02e["tmpDir()"] 843e96a9_e536_4564_00a1_4c4f374741aa -->|calls| 13cca41d_e6d4_6c55_4166_597017d5c02e bc937c1c_ec1c_7511_0eee_c35de09ea03e["getLogFile()"] 843e96a9_e536_4564_00a1_4c4f374741aa -->|calls| bc937c1c_ec1c_7511_0eee_c35de09ea03e bffa5cc2_2336_d219_9e81_a81a831f09b1["initialize()"] 843e96a9_e536_4564_00a1_4c4f374741aa -->|calls| bffa5cc2_2336_d219_9e81_a81a831f09b1 cd4620eb_deae_3575_f645_e33d9aacf415["of()"] 843e96a9_e536_4564_00a1_4c4f374741aa -->|calls| cd4620eb_deae_3575_f645_e33d9aacf415 599de821_15df_43cf_ef7e_1637f660f37b["getLineWithText()"] 843e96a9_e536_4564_00a1_4c4f374741aa -->|calls| 599de821_15df_43cf_ef7e_1637f660f37b 501f40c7_eea3_8197_664f_2a7d4a9c3264["beforeInitialize()"] 843e96a9_e536_4564_00a1_4c4f374741aa -->|calls| 501f40c7_eea3_8197_664f_2a7d4a9c3264 style 843e96a9_e536_4564_00a1_4c4f374741aa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java lines 542–555
@Test
void correlationLoggingToFileWhenExpectCorrelationIdTrueAndMdcContent() {
this.environment.setProperty(LoggingSystem.EXPECT_CORRELATION_ID_PROPERTY, "true");
new LoggingSystemProperties(this.environment).apply();
File file = new File(tmpDir(), "log4j2-test.log");
LogFile logFile = getLogFile(file.getPath(), null);
this.loggingSystem.disableSelfInitialization();
this.loggingSystem.beforeInitialize();
this.loggingSystem.initialize(this.initializationContext, null, logFile);
MDC.setContextMap(Map.of("traceId", "01234567890123456789012345678901", "spanId", "0123456789012345"));
this.logger.info("Hello world");
assertThat(getLineWithText(file, "Hello world"))
.contains(" [01234567890123456789012345678901-0123456789012345] ");
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does correlationLoggingToFileWhenExpectCorrelationIdTrueAndMdcContent() do?
correlationLoggingToFileWhenExpectCorrelationIdTrueAndMdcContent() is a function in the spring-boot codebase.
What does correlationLoggingToFileWhenExpectCorrelationIdTrueAndMdcContent() call?
correlationLoggingToFileWhenExpectCorrelationIdTrueAndMdcContent() calls 8 function(s): LoggingSystemProperties, apply, beforeInitialize, getLineWithText, getLogFile, initialize, of, tmpDir.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free