logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: Reloading the configuration
Date Tue, 20 Apr 2021 22:17:00 GMT
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 <nhrdls@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-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message