You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2018/01/04 22:45:01 UTC

[jira] [Comment Edited] (LOG4J2-2177) Replace use of deprecated Core API org.apache.logging.log4j.core.impl.Log4jLogEvent.Builder.setContextMap(Map)

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

Remko Popma edited comment on LOG4J2-2177 at 1/4/18 10:44 PM:
--------------------------------------------------------------

Why does {{ContextDataFactory}} need to change its return value from {{StringMap}} to {{IndexedStringMap}}?

Please be aware that this would be a very impactful change that would limit future change: there are not many map-like data structures that can (efficiently) return values by index and by key at the same time. 

Any logic internally in Log4j2 that consumes {{IndexedStringMap}} is doing so as a performance optimization and should be able to fall back to a plain {{StringMap}}. 


was (Author: remkop@yahoo.com):
Why does {{ContextDataFactory}} need to change its return value from {{StringMap}} to {{IndexedStringMap}}?

> Replace use of deprecated Core API org.apache.logging.log4j.core.impl.Log4jLogEvent.Builder.setContextMap(Map<String, String>)
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-2177
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2177
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.10.0
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>
> Replace use of deprecated Core API {{org.apache.logging.log4j.core.impl.Log4jLogEvent.Builder.setContextMap(Map<String, String>)}}
> In order to implement this cleanly, the internal class {{org.apache.logging.log4j.core.impl.ContextDataFactory}} will change its API return values from {{StringMap}} to {{IndexedStringMap}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)