Well, yes. Log4j version 1.2 will use the value of the system property called 
log4j.configuratorClass to parse the configuration file. (The log4j 1.1.3 has a 
different way to specify the configurator class  but it was bogus so I will not 
describe it here.) 

Armed with this knowledge, you could quite easily extend ProppertyConfigurator (or 
DOMConfigurator) such that the configuration file will be reread. Basically you have 
to merge the functionality of existing PropertyConfigurator.configureAndWatch method 
into your new Configurator class.

It would be quite nice if this extended configurator had lifecycle methods to 
stop/resume the thread watching for changes in the config file. It's a nice little 
software project if anyone is interested.

Regards, Ceki

At 14:53 26.11.2001 -0800, you wrote:
>Would it be possible to tell log4j to re-read the
>log4.properties it read at initialization time
>progammatically?  Thanks...
>
>--- Ceki Gulcu <[EMAIL PROTECTED]> wrote:
>> 
>> The default initialization is performed when the
>> Category class is loaded into memory. That happens
>> only once unless your environment unloads your
>> application and reloads log4j classes, but that is
>> not something that the user (=you) can control
>> programmatically. Ceki
>> 
>> At 14:34 26.11.2001 -0800, you wrote:
>> >When Log4J is loaded, it initializes itself by
>> looking
>> >for log4j.properties in a number of places.  How
>> can I
>> >trigger the initialization process at will?  
>> >
>> >Thanks....
>> 
>> 
>> --
>> To unsubscribe, e-mail:  
>> <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>> 
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
>http://geocities.yahoo.com/ps/info1
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to