Log4j supports reloading configuration files over loaded using HTTP based on 
the monitorInterval specified in the configuration file. 
1. If the interval is greater than 0 the Log4j will poll the file periodically 
to see if it has been updated.
2. If the interval is zero but the configuration is listening for event 
notifications then the configuration is checked whenever an event is fired.

In both cases Log4j calls the url passing the If-Modified-Since header and 
expects a response of OK if the configuration has changed and NOT MODIFIED if 
it has not. This means if your server does not support If-Modified-Since that 
Log4j would reconfigure at every polling interval.

Ralph

> On Apr 20, 2021, at 2:38 PM, Niranjan Rao <nhr...@gmail.com> wrote:
> 
> Greetings,
> 
> We are currently using version 2.13.3.
> 
> We typically set -Dlog4j.configurationFile property on JVM to set the URL. 
> Log configuration files are centralized on one web server and multiple 
> instances of the application access the same configuration file.
> 
> If we change the logging configuration, what will be the best way to reload 
> the configuration? Please note configuration file is not local, but served 
> over https channel. We already have functionality to update any other 
> configuration by sending appropriate signals to application and we can easily 
> wire for other configuration updates.
> 
> I have tried usual searches  but could not reach any conclusion.
> 
> 
> How do I ask log4 to update the configuration - especially if it's remote 
> configuration file.
> 
> 
> Regards,
> 
> 
> Niranjan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 



---------------------------------------------------------------------
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