From b9579f786dd3cb5ecbae35ca6a7cd77b6ed07d0b Mon Sep 17 00:00:00 2001 From: oshai Date: Tue, 11 Jul 2023 00:17:06 +0300 Subject: [PATCH] rename to fqcn and make it default with static val --- .../java/org/apache/logging/slf4j/Log4jEventBuilder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/log4j-slf4j2-impl/src/main/java/org/apache/logging/slf4j/Log4jEventBuilder.java b/log4j-slf4j2-impl/src/main/java/org/apache/logging/slf4j/Log4jEventBuilder.java index 165aacc0904..6cef8e518a1 100644 --- a/log4j-slf4j2-impl/src/main/java/org/apache/logging/slf4j/Log4jEventBuilder.java +++ b/log4j-slf4j2-impl/src/main/java/org/apache/logging/slf4j/Log4jEventBuilder.java @@ -44,7 +44,7 @@ public class Log4jEventBuilder implements LoggingEventBuilder, CallerBoundaryAwa private Throwable throwable = null; private Map keyValuePairs = null; private final Level level; - private String fqcnOverride; + private String fqcn = FQCN; public Log4jEventBuilder(final Log4jMarkerFactory markerFactory, final Logger logger, final Level level) { this.markerFactory = markerFactory; @@ -112,7 +112,7 @@ public void log() { .withMarker(marker) .withThrowable(throwable); if (logBuilder instanceof BridgeAware) { - String fqcn = fqcnOverride != null ? fqcnOverride : FQCN; + String fqcn = this.fqcn != null ? this.fqcn : FQCN; ((BridgeAware) logBuilder).setEntryPoint(fqcn); } if (keyValuePairs == null || keyValuePairs.isEmpty()) { @@ -162,6 +162,6 @@ public void log(final Supplier messageSupplier) { @Override public void setCallerBoundary(String fqcn) { - fqcnOverride = fqcn; + this.fqcn = fqcn; } }