correlationLoggingToConsoleWhenHasCorrelationPattern() — spring-boot Function Reference
Architecture documentation for the correlationLoggingToConsoleWhenHasCorrelationPattern() function in Log4J2LoggingSystemTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD ca086653_5113_ea33_c589_657facc7cacd["correlationLoggingToConsoleWhenHasCorrelationPattern()"] bffa5cc2_2336_d219_9e81_a81a831f09b1["initialize()"] ca086653_5113_ea33_c589_657facc7cacd -->|calls| bffa5cc2_2336_d219_9e81_a81a831f09b1 cd4620eb_deae_3575_f645_e33d9aacf415["of()"] ca086653_5113_ea33_c589_657facc7cacd -->|calls| cd4620eb_deae_3575_f645_e33d9aacf415 599de821_15df_43cf_ef7e_1637f660f37b["getLineWithText()"] ca086653_5113_ea33_c589_657facc7cacd -->|calls| 599de821_15df_43cf_ef7e_1637f660f37b 501f40c7_eea3_8197_664f_2a7d4a9c3264["beforeInitialize()"] ca086653_5113_ea33_c589_657facc7cacd -->|calls| 501f40c7_eea3_8197_664f_2a7d4a9c3264 style ca086653_5113_ea33_c589_657facc7cacd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java lines 591–601
@Test
void correlationLoggingToConsoleWhenHasCorrelationPattern(CapturedOutput output) {
this.environment.setProperty("logging.pattern.correlation", "%correlationId{spanId(0),traceId(0)}");
this.loggingSystem.disableSelfInitialization();
this.loggingSystem.beforeInitialize();
this.loggingSystem.initialize(this.initializationContext, null, null);
MDC.setContextMap(Map.of("traceId", "01234567890123456789012345678901", "spanId", "0123456789012345"));
this.logger.info("Hello world");
assertThat(getLineWithText(output, "Hello world"))
.contains(" [0123456789012345-01234567890123456789012345678901] ");
}
Domain
Subdomains
Source
Frequently Asked Questions
What does correlationLoggingToConsoleWhenHasCorrelationPattern() do?
correlationLoggingToConsoleWhenHasCorrelationPattern() is a function in the spring-boot codebase.
What does correlationLoggingToConsoleWhenHasCorrelationPattern() call?
correlationLoggingToConsoleWhenHasCorrelationPattern() calls 4 function(s): beforeInitialize, getLineWithText, initialize, of.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free