ppkarwasz commented on issue #3819:
URL: 
https://github.com/apache/logging-log4j2/issues/3819#issuecomment-3067054551

   Hi @gmiscione,
   
   Great catch — thanks for reporting this! :100:
   
   I see two possible approaches to address the issue:
   
   1. **Fix the misuse of `ThreadLocal`** in the current implementation.
   2. **Remove `LogBuilder` pooling altogether**.
   
   Given that Logback is essentially the only native SLF4J implementation in 
widespread use, I’d be interested in your opinion from a Logback user’s 
perspective. To my knowledge, Logback doesn’t use object pooling either. So 
from that angle, completely removing the thread-local `LogBuilder` pool might 
be the cleaner and more consistent option—even outside servlet environments.
   
   For some context: in version `2.23.0`, we already removed `Message` pooling 
from `log4j-to-slf4j` (see #3823), precisely because it didn't align well with 
the expectations of users coming from SLF4J-based systems. Removing 
`LogBuilder` pooling would seem like a natural continuation of that decision.
   
   What’s your take on this? Would you prefer a minimal fix or a more thorough 
cleanup?
   


-- 
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]

Reply via email to