> On Jul 17, 2024, at 2:11 PM, Piotr P. Karwasz <piotr.karw...@gmail.com> wrote:
>
> Hi Matt,
>
> On Wed, 17 Jul 2024 at 19:03, Matt Sicker <m...@musigma.org> wrote:
>> I’ll note one design constraint behind property sources and lookups.
>> Property sources are defined in the API while lookups are defined in Core.
>
> Since Log4j Core 3 has a different properties system, property sources
> are technically defined in the API, but are almost unused in the API.
> They are only used:
>
> 1. For the `log4j.provider` property[1],
> 2. For the `SimpleLoggerContext` and related classes[2].
>
> Status logger since 2.23.0 does not depend on `PropertiesUtil`[3].
> The remaining properties (including the configuration of
> `ThreadContextMap`) are used in Log4j Core. In this way Log4j Core 3
> can have its own properties system.
>
>> Besides that, property sources are intended for use with configuration
>> (either for components outside the config file or for reuse in a config
>> file) while lookups are intended for use with log events, though the ability
>> to use properties in log events makes this confusing.
>
> Most lookups don't really profit from the `LogEvent` parameter[4] and
> those that do, have a corresponding `PatternConverter`.
Conversely, most PatternConverters are only useful in a log event. Allowing
them to be used outside of one would be awful. The only exception that comes to
mind is the DateConverter.
Ralph