[ 
https://issues.apache.org/jira/browse/LOG4J2-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461838#comment-13461838
 ] 

Ralph Goers commented on LOG4J2-84:
-----------------------------------

I am not convinced that completely disabling the NDC is a good idea as it could 
lead to application breakage.  However, I am convinced that having the 
ThreadContext stack be null in the LogEvent when there are no items in the 
stack is a very good idea. 

I plan on making that change and also plan on changing the stack stored in the 
LogEvent to be immutable. In addition, I plan on changing the ThreadContext API 
so that it doesn't use java.util.Stack but uses its own ContextStack interface. 
 This will provide some freedom in changing the actual implementation of the 
stack.
                
> Please provide means to disable NDC functionality on a global level.
> --------------------------------------------------------------------
>
>                 Key: LOG4J2-84
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-84
>             Project: Log4j 2
>          Issue Type: New Feature
>            Reporter: Joern Huxhorn
>
> Disabling NDC evaluation can have drastic effects on event size while sending 
> them over the wire or dumping them to disk.
> When disabled, all calls to NDC-related methods will instead call NOP 
> implementations, i.e. no ThreadLocals would be used at all.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to