Re: Configuration element for system properties

2021-12-23 Thread Volkan Yazıcı
Judging from the PropertiesUtil, it is indeed not a typo but an undocumented feature. I think we shouldn't have any undocumented features; created LOG4J2-3287 . A slightly related issue I have raised in 2019 was making constants a part of the conf

Re: Configuration element for system properties

2021-12-20 Thread Ralph Goers
It is not a typo. We may be missing documentation. I’ll have to search and see. Ralph > On Dec 20, 2021, at 1:18 PM, Gary Gregory wrote: > > Our page > https://logging.apache.org/log4j/2.x/manual/configuration.html#SystemProperties > documents log4j2.component.properties, but you talk about >

Re: Configuration element for system properties

2021-12-20 Thread Gary Gregory
Our page https://logging.apache.org/log4j/2.x/manual/configuration.html#SystemProperties documents log4j2.component.properties, but you talk about log4j2.system.properties. Is that a typo or are we missing documentation? Gary On Mon, Dec 20, 2021 at 3:12 PM Ralph Goers wrote: > > This proposal

Re: Configuration element for system properties

2021-12-20 Thread Ralph Goers
This proposal is problematic. By the time this happens it is possible it is too late for some system properties to do any good. I implemented support for system properties already. I had a need for it for the Spring support. Just put the properties in log4j2.system.properties. PropertiesUtil p

Re: Configuration element for system properties

2021-12-20 Thread Gary Gregory
This one; log4j2.component.properties. That's good indeed, as of now, our tooling is not something I can easily update to generate a new file that then gets propagated to the right place. But it is "simple" to add another entry to an existing file. Not something Log4j needs to worry about of cours

Re: Configuration element for system properties

2021-12-20 Thread Matt Sicker
Without additional refactoring, the only way this would work is if the logging config is the only config in the application. System properties are global to the JVM. There's already a properties file you can include that gets loaded as a log4j2 system properties file, by the way. On Mon, Dec 20, 2

Configuration element for system properties

2021-12-20 Thread Gary Gregory
Hello, I'd like to propose that we add an element called SystemProperty to our configuration. This would look like our current Property element but would set a system property instead of a configuration property. My use case is, at work, our tooling generates one XML configuration file for a user