Re: Log4j2 replacement of PropertyConfigurator APIs configureAndWatch and configure

2023-03-22 Thread Viraj Jasani
Sounds good, thanks! > Looking at what that code is doing it is just enabling logging to a file at a level for some time period. In addition to that, it’s also updating thresholds of all the appenders (and reseting them to previous level by a job). That's the part I was bit worried about as to wh

Re: Log4j2 replacement of PropertyConfigurator APIs configureAndWatch and configure

2023-03-21 Thread Viraj Jasani
Thanks a lot, Ralph! Let me ask one more question. For any further questions, I would create a new mail thread. We also have a utility in hadoop that tries to add FileAppender at runtime, and also change the threshold of all appenders from root level. Is this doable with log4j2? I could not find A

Re: Log4j2 replacement of PropertyConfigurator APIs configureAndWatch and configure

2023-03-21 Thread Viraj Jasani
I believe we can use "Configurator.reconfigure(uri)", however just wanted to make sure if this is the only right way (stable API). On Tue, Mar 21, 2023 at 4:57 PM Viraj Jasani wrote: > Just a follow up on this, do we have replacement for > "LogManager.resetConfiguration" in log4j2? > > > On Sat

Re: Log4j2 replacement of PropertyConfigurator APIs configureAndWatch and configure

2023-03-21 Thread Viraj Jasani
Just a follow up on this, do we have replacement for "LogManager.resetConfiguration" in log4j2? On Sat, 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, monitorInterval, > name,

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