yybmion commented on PR #3810:
URL: https://github.com/apache/logging-log4j2/pull/3810#issuecomment-3094726259

   Hi @vy,
   
   Thank you for the question! 
   
   You previously provided positive feedback on this issue, stating:
   
   > "I think your assessment is correct: ThreadContext always creates a 
DefaultThreadContextStack instance for its ThreadContextStack. Ideally 
ThreadContextStack should be provided by a ThreadContextStackFactory just like 
ThreadContextMapFactory.createThreadContextMap() does."
   
   I understand your concern about whether this is truly essential 
functionality. You're absolutely right that most use cases could be implemented 
using custom ThreadContextMap implementations. I share some of that skepticism 
about strict necessity.
   
   However, I approached this primarily from the architectural consistency 
perspective you mentioned. The goal is to complete the factory pattern design 
that you identified as "ideal" - ensuring ThreadContextStack follows the same 
extensibility pattern as ThreadContextMap, rather than being the only hardcoded 
component.
   
   This implementation maintains architectural consistency across the 
ThreadContext API and utilizes existing infrastructure already present in 
Provider.java (getThreadContextStackInstance method).
   
   I believe this aligns with the design vision you described, but I'm happy to 
discuss whether the architectural benefits justify the added complexity.
   
   Best regards


-- 
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-unsubscr...@logging.apache.org

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

Reply via email to