[
https://issues.apache.org/jira/browse/LOG4J2-3615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616045#comment-17616045
]
Piotr Karwasz commented on LOG4J2-3615:
---------------------------------------
{{DefaultLogBuilder}} is basically a {{LogBuilder}} with an integrated
{{reset()}} method. As is we can not get rid of it.
However if we were to move the
[Recycler|https://logging.apache.org/log4j/2.x/log4j-layout-template-json/apidocs/org/apache/logging/log4j/layout/template/json/util/Recycler.html]
interface to the API, we could replace the {{ThreadLocal<DefaultLogBuilder>}}
with {{Recycler<LogBuilder>}}.
> Fix Log4j API OSGI encapsulation problem
> ----------------------------------------
>
> Key: LOG4J2-3615
> URL: https://issues.apache.org/jira/browse/LOG4J2-3615
> Project: Log4j 2
> Issue Type: Bug
> Components: API
> Reporter: Piotr Karwasz
> Priority: Minor
>
> The protected {{AbstractLogger.logBuilder}} field leaks the internal
> {{DefaultLogBuilder}} class into the public API.
> The field was introduced in August 2019, so switching it to private will be a
> breaking change.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)