Re: PatternLayout caching system property lookup values

2022-11-22 Thread Stig Døssing
Thanks for your responses. They both resolve the issue I had. On 18/11/2022, 16.48, "Piotr P. Karwasz" wrote: Hi Stig, On Fri, 18 Nov 2022 at 11:03, Stig Døssing wrote: > Is there a way to disable this “permanent substitution” and get log4j to do the system property lookup

Re: PatternLayout caching system property lookup values

2022-11-18 Thread Piotr P. Karwasz
Hi Stig, On Fri, 18 Nov 2022 at 11:03, Stig Døssing wrote: > Is there a way to disable this “permanent substitution” and get log4j to do > the system property lookup for every log event, even if there is a default > value? If not, should there be? System properties can be changed from inside

Re: PatternLayout caching system property lookup values

2022-11-18 Thread Volkan Yazıcı
Hey Stig, I see the problem and I don't know of a way to disable the substitution performed at "pattern compile-time", which is possibly there due to efficiency reasons. Others might have a better idea, though, given you try to glue a business logic via lookups, what you can also do is to

PatternLayout caching system property lookup values

2022-11-18 Thread Stig Døssing
Hi, I’m seeing some unfortunate caching or substitution behavior when using system property lookups in a PatternLayout. I’m using a system property lookup to inject some application-specific context into all my log lines. The context is not available when the logging system is initialized, but