Thank you Ralph and Gary for quick response. I was testing using the 'monitorInterval' in intellij. I was testing by changing log4j2.xml file in 'resources' folder. I completely forgot the fact that the files get copied to 'out' from the source folder when intellij starts running the application.
Regards, Alwin On Tue, Apr 2, 2019, 5: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 > >