[
https://issues.apache.org/jira/browse/LOG4J2-1010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15349607#comment-15349607
]
Remko Popma edited comment on LOG4J2-1010 at 6/25/16 11:50 AM:
---------------------------------------------------------------
Good point that authors of async frameworks may not bother.
How would the injector be configured, if not through configuration or a system
property (or an entry in a {{log4j2.component.properties}} file in the
classpath)? I mean, the default injector (that copies values from the
ThreadContext) will be installed by default, but if someone wants to install a
different injector, it needs to be configured one way or another...
I was thinking to use a system property (this feature feels too "internal" to
ask users to configure it in the Log4j configuration). Would that work for you
with the Scala context injector?
was (Author: [email protected]):
Good point that authors of async frameworks may not bother.
How would the injector be configured, if not through configuration or a system
property (or an entry in a {{log4j2.component.properties}} file in the
classpath)? I mean, the default injector (that copies values from the
ThreadContext) will be installed by default, but if someone wants to install a
different injector, it needs to be configured one way or another...
> 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
> Assignee: Remko Popma
> Fix For: 2.7
>
> 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]