struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Beal <jbb...@gmail.com>
Subject Re: changing log4J configuration during run time
Date Wed, 12 Oct 2005 16:50:50 GMT
We have a "super-secret" (that is, not linked to) URL in our
application that we can use to trigger a Log4J reload.  We don't have
to restart the server, but we also don't have to worry about the
possibility of configureAndWatch() taking *any* cycles from our
production box.  (Since I put in this mechanism about a year ago, we
have used our "super-secret" URL roughly twice.  It just seems silly
to constantly watch a file that only changes twice a year, even if the
watching doesn't take up significant resources.)

-- Jeff

On 10/12/05, Deep Chand <dgiscool@gmail.com> wrote:
> Hi,
>
> In log4J, if I change the configuration i.e. increase/decrease the
> level of a particular logger or add more appenders/categories in the
> config file, then do I have to restart the web server for that setting
> to take effect.
>
> What I understand from the documentation is that if I use
> DOMConfigurator.configureAndWatch(<configFileName>, <timeInMilliSec>)
> then I don't have to restart the server. Is this the only way to
> change the logging configuration during run time or there are some
> other ways also? If you use this method, then a thread is launched
> which continously monitors the config file changes. Is this technique
> has some serious performance overhead and therefore not preffered in
> production enviornment?
>
> What do people generally prefer - use this method OR simply use
> DOMConfigurator.configure(fileName) and restart the server after
> changing the config file?
>
> Thanks
> Deep
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Mime
View raw message