[
https://issues.apache.org/jira/browse/LOG4J2-479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14048966#comment-14048966
]
Ralph Goers commented on LOG4J2-479:
------------------------------------
clearStack has been around since the ContextStack was added to the
ThreadContext - several years now. clear was renamed because it wasn't clear
what it cleared. It was renamed clearMap. The clearAll method was added to
clear both the stack and map.
You can expect that these won't change again.
Thanks for letting us know about the documentation error. We will get that
fixed.
> Use of InheritableThreadLocal in Map ThreadContext is dangerous and unhelpful
> -----------------------------------------------------------------------------
>
> Key: LOG4J2-479
> URL: https://issues.apache.org/jira/browse/LOG4J2-479
> Project: Log4j 2
> Issue Type: Bug
> Reporter: MK
> Assignee: Remko Popma
> Fix For: 2.0-rc1
>
>
> Described here http://logging.apache.org/log4j/2.x/manual/thread-context.html
> The use of InheritableThreadLocal creates subtle and hard to track bugs while
> not really adding much useful. It is counterintuitive -- I don't see why
> would anyone expect logging context to be inherited. But it breaks down
> completely when used with Thread Executors.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]