[ 
https://issues.apache.org/jira/browse/LOG4J2-2904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17173203#comment-17173203
 ] 

Ralph Goers commented on LOG4J2-2904:
-------------------------------------

PRs are welcome. Normally, Lookups are Plugins. The logic in question exists 
because the plugin system hasn't been initialized at this point so you would 
need to invent some other way for Lookups to be accessed. For example, via 
ServiceLoader.

> Provide a way to add  customized StrLookUps in Interpolator initialization.
> ---------------------------------------------------------------------------
>
>                 Key: LOG4J2-2904
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2904
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.13.3
>            Reporter: Tommy.Tesla
>            Priority: Major
>
> Currently, there are following strlookups :
>  
> public Interpolator(final Map<String, String> properties) {
> ...
> // TODO: this ought to use the PluginManager
>  strLookupMap.put("log4j", new Log4jLookup());
>  strLookupMap.put("sys", new SystemPropertiesLookup());
>  strLookupMap.put("env", new EnvironmentLookup());
>  strLookupMap.put("main", MainMapLookup.MAIN_SINGLETON);
>  strLookupMap.put("marker", new MarkerLookup());
>  strLookupMap.put("java", new JavaLookup());
>  strLookupMap.put("lower", new LowerLookup());
>  strLookupMap.put("upper", new UpperLookup());
> ...
>  
> BUT, at sometime, we hope to add a customized LookUp implement to resolve the 
> variable in log4j2.xml.
> Advice: a SPI for StrLookUp could support this feature.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to