You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Joshua Blake <js...@mac.com> on 2007/08/22 09:00:44 UTC
Watch functionality with log4j.configuration System property?
I searched the archives & docs for this question, thinking it must
have come up before, but didn't find anything. If this has come up
before, please be so kind as to send me a link to the previous
posting/document. Thank you!
I want to configure Log4J using XML, and without specifying the
config filename in my code. I also want to be able to watch the
config file for changes and reload dynamically. I can do the former
using the system property "log4j.configuration", which works great.
However, that method doesn't appear to watch & reload the config file
when its been changed. Is there a way to do this without manually
calling DOMConfigurator.configureAndWatch(filename)?
Thanks!
- Josh
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Watch functionality with log4j.configuration System property?
Posted by "James A. N. Stauffer" <st...@gmail.com>.
Set a system property with the config filename and call
DOMConfigurator.configureAndWatch with the value of that system
property.
On 8/22/07, Joshua Blake <js...@mac.com> wrote:
> I searched the archives & docs for this question, thinking it must
> have come up before, but didn't find anything. If this has come up
> before, please be so kind as to send me a link to the previous
> posting/document. Thank you!
>
> I want to configure Log4J using XML, and without specifying the
> config filename in my code. I also want to be able to watch the
> config file for changes and reload dynamically. I can do the former
> using the system property "log4j.configuration", which works great.
> However, that method doesn't appear to watch & reload the config file
> when its been changed. Is there a way to do this without manually
> calling DOMConfigurator.configureAndWatch(filename)?
>
> Thanks!
>
> - Josh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James A. N. Stauffer http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org