The Log4j variation used StrSubstitutor straight from Commons (wherever it was 
located at the time) but then had to modify some of the methods to accept 
LogEvents.
To do this StringSubstitutor would have to be modified to be 
StringSubstitutor<T> and 
allow an object of type T to be passed to the replace and substitute methods. 

But the biggest impact would be that resolveVariable in Log4j calls Log4j’s 
version of 
StrLookup which does not define all the other lookups in it and has an evaluate 
method 
(Commons StrLookup uses a lookup method) that accepts the LogEvent.
So StrLookup would need significant modifications to be usable by Log4j.

Ralph

> On Apr 7, 2022, at 6:48 AM, Gary Gregory <garydgreg...@gmail.com> wrote:
> 
> The log4j variable interpolation, the ${lookup:variable} type of logic is
> in many places: deprecated in Commons Lang, now in Commons Text, also
> implemented in Commons Configuration. We could bring in the Log4j version,
> now safer than other implementations into Commons Text or a new component
> and everyone depends on this new version.
> 
> Gary
> 
> On Thu, Apr 7, 2022, 05:55 Peter Verhas <pe...@verhas.com> wrote:
> 
>>> 
>>>> The plugin system is design to convert configuration data into
>>> instantiated objects.
>>> 
>> 
>> For me that very much reads a dependency injection framework.
>> 
>> --
>> Peter Verhas
>> pe...@verhas.com
>> t: +41791542095
>> skype: verhas
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to