vy commented on code in PR #1401:
URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1173939775
##########
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:
@ppkarwasz, good catch. Fixed in c72f4c3e44b59cede15c5d594e95c6dd48d0e0f0.
Mind resolving the conversation if you agree with the solution?
--
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]