Home / Class/ CustomLog4j2StructuredLoggingFormatterWithInjection Class — spring-boot Architecture

CustomLog4j2StructuredLoggingFormatterWithInjection Class — spring-boot Architecture

Architecture documentation for the CustomLog4j2StructuredLoggingFormatterWithInjection class in StructuredLogLayoutTests.java from the spring-boot codebase.

Entity Profile

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/StructuredLogLayoutTests.java lines 161–174

	static final class CustomLog4j2StructuredLoggingFormatterWithInjection implements StructuredLogFormatter<LogEvent> {

		private final Environment environment;

		CustomLog4j2StructuredLoggingFormatterWithInjection(Environment environment) {
			this.environment = environment;
		}

		@Override
		public String format(LogEvent event) {
			return "custom-format-with-injection pid=" + this.environment.getProperty("spring.application.pid");
		}

	}

Domain

Analyze Your Own Codebase

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

Try Supermodel Free