[
https://issues.apache.org/jira/browse/LOG4J2-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15438177#comment-15438177
]
Gary Gregory edited comment on LOG4J2-1540 at 8/26/16 12:13 AM:
----------------------------------------------------------------
For this next step I see two approaches:
- The APIs that take {{String name, T factoryData}} * can be changed to add a
{{Configuration}}, then at the right time, the code can call
{{Configuration.getLoggerContext()}} when it is time to build an
{{AbstractManager}} subclass. Or,
- All factory data classes can add a {{Configuration}} (or {{LoggerContext}})
field. As above, The LC is fed to ctors when building managers.
Core APIs like:
- OutputStreamManager.getManager(String, T, ManagerFactory<? extends
OutputStreamManager, T>)
- AbstractManager.getManager(String, ManagerFactory<M, T>, T)
- createManager(String, T)
Would become:
- OutputStreamManager.getManager(Configuration, String, T, ManagerFactory<?
extends OutputStreamManager, T>)
- AbstractManager.getManager(Configuration, String, ManagerFactory<M, T>, T)
- createManager(Configuration, String, T)
Thoughts?
Gary
was (Author: garydgregory):
For this next step I see two approaches:
- The APIs that take {{String name, T factoryData}} can be changed to add a
{{Configuration}}, then at the right time, the code can call
{{Configuration.getLoggerContext()}} when it is time to build an
{{AbstractManager}} subclass. Or,
- All factory data classes can add a {{Configuration}} (or {{LoggerContext}})
field. As above, The LC is fed to ctors when building managers.
Thoughts?
Gary
> The Core AbstractManager should track its LoggerContext
> -------------------------------------------------------
>
> Key: LOG4J2-1540
> URL: https://issues.apache.org/jira/browse/LOG4J2-1540
> Project: Log4j 2
> Issue Type: New Feature
> Reporter: Gary Gregory
> Assignee: Gary Gregory
>
> The class in Core, {{AbstractManager}}, should track its {{LoggerContext}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]