[ https://issues.apache.org/jira/browse/LOG4J2-1033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14564986#comment-14564986 ]
Mikael Ståldal commented on LOG4J2-1033: ---------------------------------------- Now when this is fixed, what is the actual purpose for ThreadContextMap.getCopy() and ThreadContext.getContext()? It seems like the only usage is in org.apache.logging.slf4j.Log4jMDCAdapter. > SimpleLogger creates unnecessary Map objects by calling > ThreadContext.getContext() instead of getImmutableContext() > -------------------------------------------------------------------------------------------------------------------- > > Key: LOG4J2-1033 > URL: https://issues.apache.org/jira/browse/LOG4J2-1033 > Project: Log4j 2 > Issue Type: Bug > Components: API > Affects Versions: 2.3 > Environment: Apache Maven 3.2.5 > (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T09:29:23-08:00) > Maven home: C:\Java\apache-maven-3.2.5 > Java version: 1.7.0_79, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0_79\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows" > Reporter: Gary Gregory > Fix For: 2.4 > > > SimpleLogger creates unnecessary Map objects by calling > ThreadContext.getContext() instead of getImmutableContext() each time > logMessage is called and 'show context map' is enabled. > Reported on the ML by Mikael Ståldal. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org