Hello,

This was sent to log4j-user list. I am forwarding it here in case anyone
is interested in working on a configurator extending PropertyConfigorator (or 
DOMConfigurator) such that the doConfigure method watches for file changes and 
offering basic lifecycle methods (stop/resume) to control the watch-thread. 

Regards, Ceki

>Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
>List-Subscribe: <mailto:[EMAIL PROTECTED]>
>List-Help: <mailto:[EMAIL PROTECTED]>
>List-Post: <mailto:[EMAIL PROTECTED]>
>List-Id: "Log4J Users List" <log4j-user.jakarta.apache.org>
>Reply-To: "Log4J Users List" <[EMAIL PROTECTED]>
>Delivered-To: mailing list [EMAIL PROTECTED]
>Date: Tue, 27 Nov 2001 00:22:21 +0100
>To: "Log4J Users List" <[EMAIL PROTECTED]>
>From: Ceki Gulcu <[EMAIL PROTECTED]>
>Subject: Re: Re-triggering log4j initialization
>
>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]>

Reply via email to