Hi,
And I would not use configureAndWatch in a J2EE app server because
you're not supposed to launch your own threads in that environment.  And
I would not use a ServletContext#getRealPath approach because it would
fail when running in a packed WAR or EAR.  And I would not rely on the
user.dir or other environment-specific settings because that's cruising
for a bruising from a portability perspective.  So take Jake's advice ;)

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Jacob Kjome [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, September 29, 2004 11:46 AM
>To: Log4J Users List
>Subject: RE: Reloading the properties file
>
>You can always use one of the web based Log4j configuration admin apps
>listed in
>3rd party extensions on the Log4j download page...
>
>http://logging.apache.org/log4j/docs/download.html
>
>I would *not* use configureAndWatch() in a webapp because it generates
a
>thread
>that may cause the java.lang.ThreadDeath error upon application reload
>(that
>is, without shutting down the VM/Server).
>
>Jake
>
>Quoting "Prasad, Kamakshya" <[EMAIL PROTECTED]>:
>
>> Hi,
>>
>> No I have not implemented any configurator. Currently on application
>> start-up it gets loaded from the web-inf/classes.
>> What we were thinking that after application has started up something
>> changes then how to configure.
>> If we call only configure and not configurewatch then will it be
fine.
>> The system admin when changes the file he has to reload the file in
the
>> memory by manually clicking on the button.
>>
>> KP
>>
>> -----Original Message-----
>> From: Ivan Jouikov [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, September 29, 2004 4:17 PM
>> To: 'Log4J Users List'
>> Subject: RE: Reloading the properties file
>>
>> Writing a servlet to call configure and watch?
>>
>> When you configure log4j using DOMConfigurator, and use
>> configureAndWatch, it automatically reloads that file when it
changes.
>> You don't need to invoke anything.
>>
>> > -----Original Message-----
>> > From: Prasad, Kamakshya [mailto:[EMAIL PROTECTED]
>> > Sent: Tuesday, September 28, 2004 11:27 PM
>> > To: [EMAIL PROTECTED]
>> > Subject: Reloading the properties file
>> >
>> > Hi All,
>> >
>> >
>> >
>> > We have a j2ee web application using log4j for logging purpose.
>> Nowadays
>> > quite frequently we have to switch on and switch off the debugging
>> > mechanism.
>> >
>> > The properties file is in web-inf/classes.
>> >
>> > We have to load the configuration file whenever it changes.
>> >
>> > We are planning to write a servlet which calls the
>> PropertyConfigurator
>> > configureAndWatch method to reload the properties file.
>> >
>> > But we just read through the log4j faq that this is unsafe.
>> >
>> > Please advice me the best way to implement this reloading
mechanism.
>> >
>> >
>> >
>> > KP
>> >
>> >
>> > ---
>> > Incoming mail is certified Virus Free.
>> > Checked by AVG anti-virus system (http://www.grisoft.com).
>> > Version: 6.0.766 / Virus Database: 513 - Release Date: 17.09.2004
>> >
>>
>> ---
>> Outgoing mail is certified Virus Free.
>> Checked by AVG anti-virus system (http://www.grisoft.com).
>> Version: 6.0.766 / Virus Database: 513 - Release Date: 17.09.2004
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to