[
https://issues.apache.org/jira/browse/LOG4J2-1010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15346691#comment-15346691
]
Remko Popma commented on LOG4J2-1010:
-------------------------------------
I think there is still some confusion on how to use this.
This interface is not intended to be used by the application. It is used
internally by Log4j.
I propose that in the Scala module, you provide a utility class similar to the
log4j-api ThreadContext class, that allows users to put key-value pairs in the
Finacle Context (or in Locals). _This_ is the API that applications would use.
The {{ScalaContextInjector}} implementation would take the key-value pairs out
of the Locals and copy them into the LogEvent's CustomData every time something
is logged.
> 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]