[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-dev
Subject:    RE: [PATCH] FileWatchdog, et al
From:       Mark Womack <mwomack () bevocal ! com>
Date:       2001-08-25 17:27:29
[Download RAW message or body]

I'd just like someone to review it right now.  I'd like to do more testing
before committing it.

Thanks!
-Mark

-----Original Message-----
From: Ceki Gülcü [mailto:cgu@qos.ch]
Sent: Saturday, August 25, 2001 12:55 AM
To: LOG4J Developers Mailing List
Subject: Re: [PATCH] FileWatchdog, et al



Fellow committers,

I don't have the time to review Mark's patch in the near future. Can one of
the committers volunteer to review his patch and apply it if appropriate? 

Thanks in advance, Ceki

At 16:00 24.08.2001 -0700, Mark Womack wrote:
>Enclosed is a set of patches and source files for modifying FileWatchdog
and
>adding an abstract superclass, Watchdog.
>
>Breaking changes: No, currently existing configuration files should
function
>as they do now.
>
>API Changes: Yes, the api for FileWatchdog does change.  If developers have
>written subclasses to FileWatchdog, they will need to modify their code to
>match the new api, but the changes are not major.  If developers are only
>using the configureAndWatch() methods of the Property and DOM
configurators,
>then they will be insulated from these changes, and none of their code will
>need to change.
>
>The changes:
>1) Created an abstract class, Watchdog.java, which encapsulates the
>mechanism of checking and tracking when a watched entity has changed.  It
>implements the Runnable interface instead of extending Thread.  This class
>makes no assumptions as to what the entity type is.  It could be a file, it
>could be something else.  All it requires is that the modification date is
>returned as a long.  This class also allows subclasses to setup as the
>thread starts, and cleanup before it exits.  It also maintains a static
list
>of active watchdogs.  When a watchdog is started, it is added to the list.
>When it is stopped, it is removed from the list.  This allows some control
>as to what watchdogs are active, unlike the current implementation (as I
>understand it).
>2) Modified FileWatchdog.java to inherit from Watchdog instead of Thread.
>Most of the FileWatchdog common functionality is moved to Watchdog, so all
>that is left is the code to get the modification date of the specified
file.
>3) Modified PropertyConfigurator.java and DOMConfigurator.java to use the
>slightly modified api of FileWatchdog (imported Watchdog.java, delay became
>interval, FileWatchdog.DEFAULT_DELAY became Watchdog.DEFAULT_INTERVAL).
>
>Why the change:
>1) I think that is very possible that the entity being watched might be
>something besides a file, so an abstract class makes it easier to implement
>different types of watchdogs.  My thinking is that a configuration file
>might be a file accessed through http, so a HTTPWatchdog might check the
>"Last-Modified" header in the http response.
>2) It has been suggested that watchdogs be configurable from configuration
>files instead of only through code (configureAndWatch() methods).  Some of
>these changes make this easier to do, especially the active watchdog list.
>But those changes will come later.
>
>Please review.  Any and all feedback appreciated.  Included are the java
>files and cvs patches for pre-existing files.  Watchdog.java is a new file.
>
>I have not fully tested all of these changes.  Are there a set of JUnit or
>similar tests I can run as a regression test?
>
>-Mark
>
>
>
>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

--
Ceki Gülcü - http://qos.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic