Skip to content

Commit

Permalink
rename to fqcn and make it default with static val
Browse files Browse the repository at this point in the history
  • Loading branch information
oshai committed Jul 10, 2023
1 parent 76ebdec commit b9579f7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class Log4jEventBuilder implements LoggingEventBuilder, CallerBoundaryAwa
private Throwable throwable = null;
private Map<String, String> 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;
Expand Down Expand Up @@ -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()) {
Expand Down Expand Up @@ -162,6 +162,6 @@ public void log(final Supplier<String> messageSupplier) {

@Override
public void setCallerBoundary(String fqcn) {
fqcnOverride = fqcn;
this.fqcn = fqcn;
}
}

0 comments on commit b9579f7

Please sign in to comment.