You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2012/09/24 16:46:07 UTC

[jira] [Commented] (LOG4J2-84) Please provide means to disable NDC functionality on a global level.

    [ 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-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org