You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ppkarwasz (via GitHub)" <gi...@apache.org> on 2023/04/17 11:46:03 UTC

Re: [PR] Recycler API (logging-log4j2)

ppkarwasz commented on code in PR #1401:
URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1168564182


##########
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:
   Where is the log builder released?



-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org