vy commented on code in PR #1401:
URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1175759925
##########
log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java:
##########
@@ -2762,12 +2746,8 @@ public LogBuilder atLevel(final Level level) {
* @since 2.20.0
*/
protected LogBuilder getLogBuilder(Level level) {
- if (Constants.ENABLE_THREADLOCALS) {
- DefaultLogBuilder builder = logBuilder.get();
- if (!builder.isInUse()) {
- return builder.reset(this, level);
- }
- }
- return new DefaultLogBuilder(this, level);
+ DefaultLogBuilder builder = recycler.acquire();
Review Comment:
I have my reservations for making sure each recycler factory specializes on
instances of type `RecyclerAware`, though I couldn't resist the utility of this
idea. :star_struck:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]