[
https://issues.apache.org/jira/browse/LOG4J2-3264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carter Kozak reassigned LOG4J2-3264:
------------------------------------
Assignee: Carter Kozak
> MapLookup should lookup MapMessage before properties
> ----------------------------------------------------
>
> Key: LOG4J2-3264
> URL: https://issues.apache.org/jira/browse/LOG4J2-3264
> Project: Log4j 2
> Issue Type: Bug
> Reporter: Yanming Zhou
> Assignee: Carter Kozak
> Priority: Major
>
> According to
> [https://logging.apache.org/log4j/2.x/manual/lookups.html#MapLookup]
> {quote}
> Note that when used this way a value for "type" should be declared in the
> properties declaration to provide a default value in case the message is not
> a MapMessage or the MapMessage does not contain the key.
> {quote}
> If "type" is present with a MapMessage, then it will be picked not default
> value in the properties declaration, but the code show that the default value
> is always picked.
> [https://github.com/apache/logging-log4j2/blob/20f9a97dbe5928c3b5077bcdd2a22ac92e941655/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/MapLookup.java#L89-L104]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)