[
https://issues.apache.org/jira/browse/LOG4J2-1010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15346636#comment-15346636
]
Remko Popma commented on LOG4J2-1010:
-------------------------------------
Actually the {{List<Property>}} parameter is coming from the configuration (see
[LoggerConfig.log()|https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java#L329].
This list is merged with the ThreadContext map and the result is stored in the
LogEvent.
Another reason I want to do it this way is to support primitive thread-local
values in a garbage-free manner (see LOG4J2-1401).
I don't see why this interface would be the wrong abstraction level.
> Injectable context properties
> -----------------------------
>
> Key: LOG4J2-1010
> URL: https://issues.apache.org/jira/browse/LOG4J2-1010
> Project: Log4j 2
> Issue Type: Improvement
> Components: API
> Affects Versions: 2.2
> Reporter: Mikael Ståldal
> Attachments: properties.patch
>
>
> It would be useful to have a way to inject context properties into a
> {{LogEvent}}, as an alternative to {{ThreadContext}}.
> In an asynchronous environment, using ThreadContext as currently implemented
> is not so useful since JVM threads might not be coupled to the logical flow
> of the application.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]