Re: Log4j2 replacement of PropertyConfigurator APIs configureAndWatch and configure

2023-03-18 Thread Ralph Goers
Yes, everything is supported in the Properties format, but the syntax is confusing to almost everyone. Ralph > On Mar 18, 2023, at 11:27 AM, Viraj Jasani wrote: > > Ah looks like monitorinterval is supported as per the doc[1]: > Properties configuration files support the advertiser, monitorInt

Re: Log4j2 replacement of PropertyConfigurator APIs configureAndWatch and configure

2023-03-18 Thread Viraj Jasani
Ah looks like monitorinterval is supported as per the doc[1]: Properties configuration files support the advertiser, monitorInterval, name, packages, shutdownHook, shutdownTimeout, status, verbose, and dest attributes. 1. https://logging.apache.org/log4j/2.x/manual/configuration.html#Configuration

Re: Log4j2 replacement of PropertyConfigurator APIs configureAndWatch and configure

2023-03-18 Thread Viraj Jasani
Thanks Ralph for the recommendations! > First, I strongly recommend you switch from properties to either XML, Yaml, or JSON. The reason why we would still like to stick to properties (at least for now during the migration) is that LOG4J2-3341 allows setting level and appender at once in the prope

Re: Log4j2 replacement of PropertyConfigurator APIs configureAndWatch and configure

2023-03-18 Thread Ralph Goers
First, I strongly recommend you switch from properties to either XML, Yaml, or JSON. To prgormatically configure Log4j2 do Configurator.initialize(“ConfigName”, “log4j2.xml”); Note that there are several variations of the initialize method. If the configuration contains a monitorInterval th