Fix `log4j-api` OSGI encapsulation problem
The protected `AbstractLogger.logBuilder` field leaks the internal
`DefaultLogBuilder` class into the public API. This causes a warning in
the upgraded `maven-bundle-plugin`.
Since this is a breaking change, I think that a larger consensus is
necessary.
@@ -108,7 +108,7 @@ public abstract class AbstractLogger implements ExtendedLogger, LocationAwareLog
private final MessageFactory2 messageFactory;
private final FlowMessageFactory flowMessageFactory;
private static final ThreadLocal<int[]> recursionDepthHolder = new ThreadLocal<>(); // LOG4J2-1518, LOG4J2-2031
- protected final transient ThreadLocal<DefaultLogBuilder> logBuilder;
+ private final transient ThreadLocal<DefaultLogBuilder> logBuilder;
/**
* Creates a new logger named after this class (or subclass).
