You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/01/07 19:59:00 UTC
[jira] [Commented] (LOG4J2-3264) MapLookup should lookup MapMessage before properties
[ https://issues.apache.org/jira/browse/LOG4J2-3264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470862#comment-17470862 ]
ASF subversion and git services commented on LOG4J2-3264:
---------------------------------------------------------
Commit 7ba4e0b9a27b70e0fd369780c81718ee6e6035a7 in logging-log4j2's branch refs/heads/master from Carter Kozak
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=7ba4e0b ]
LOG4J2-3264 changelog
> 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
> Fix For: 2.17.1
>
>
> 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)