> On Apr 3, 2019, at 9:34, Alex O'Ree <alexo...@apache.org> wrote:
> 
> Isn't there a JMX/mbean based solution?
Yes there is. 
This page has more detail: https://logging.apache.org/log4j/2.x/manual/jmx.html

I remember there is an MBean API for changing the log level. 


> 
> On Tue, Apr 2, 2019 at 8:29 PM Ralph Goers <ralph.go...@dslextreme.com>
> wrote:
> 
>> There are several ways. If you are using Spring Boot you can use the REST
>> API they provide. If you are using a configuration file just add
>> monitorInterval=n where n is the number of seconds to poll for changes. The
>> configuration will automatically reload if you do that. Finally, as Gary
>> noted you can programmatically do that using the Configurator class.
>> 
>> Ralph
>> 
>>> On Apr 2, 2019, at 4:10 PM, alwin james <jamea...@gmail.com> wrote:
>>> 
>>> Hi Team,
>>> 
>>> How can we change the log level of a running application without
>>> restarting the program?
>>> 
>>> It will be really helpful if someone can point me in the right direction.
>>> 
>>> Any Java examples or documentation?
>>> 
>>> I used to achieve this using 'DOMConfigurator' in log4j.
>>> 
>>> Regards,
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>> 
>> 

Reply via email to