ceki 2004/11/17 09:39:33
Modified: src/java/org/apache/log4j PropertyConfigurator.java
Log:
Removing bogus configureAndWatch methods
Revision Changes Path
1.68 +2 -47
logging-log4j/src/java/org/apache/log4j/PropertyConfigurator.java
Index: PropertyConfigurator.java
===================================================================
RCS file:
/home/cvs/logging-log4j/src/java/org/apache/log4j/PropertyConfigurator.java,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- PropertyConfigurator.java 9 Nov 2004 11:26:41 -0000 1.67
+++ PropertyConfigurator.java 17 Nov 2004 17:39:33 -0000 1.68
@@ -22,7 +22,6 @@
import org.apache.log4j.DefaultCategoryFactory;
import org.apache.log4j.config.PropertySetter;
-import org.apache.log4j.helpers.FileWatchdog;
import org.apache.log4j.helpers.LogLog;
import org.apache.log4j.helpers.OptionConverter;
import org.apache.log4j.or.RendererMap;
@@ -345,36 +344,7 @@
new PropertyConfigurator().doConfigure(
properties, LogManager.getLoggerRepository());
}
-
- /**
- Like [EMAIL PROTECTED] #configureAndWatch(String, long)} except that the
- default delay as defined by [EMAIL PROTECTED]
FileWatchdog#DEFAULT_DELAY} is
- used.
-
- @param configFilename A file in key=value format.
-
- */
- public static void configureAndWatch(String configFilename) {
- configureAndWatch(configFilename, FileWatchdog.DEFAULT_DELAY);
- }
-
- /**
- Read the configuration file <code>configFilename</code> if it
- exists. Moreover, a thread will be created that will periodically
- check if <code>configFilename</code> has been created or
- modified. The period is determined by the <code>delay</code>
- argument. If a change or file creation is detected, then
- <code>configFilename</code> is read to configure log4j.
-
- @param configFilename A file in key=value format.
- @param delay The delay in milliseconds to wait between each check.
- */
- public static void configureAndWatch(String configFilename, long delay) {
- PropertyWatchdog pdog = new PropertyWatchdog(configFilename);
- pdog.setDelay(delay);
- pdog.start();
- }
-
+
/**
Read configuration options from <code>properties</code>.
@@ -689,19 +659,4 @@
Appender registryGet(String name) {
return (Appender) registry.get(name);
}
-}
-
-
-class PropertyWatchdog extends FileWatchdog {
- PropertyWatchdog(String filename) {
- super(filename);
- }
-
- /**
- Call [EMAIL PROTECTED] PropertyConfigurator#configure(String)} with the
- <code>filename</code> to reconfigure log4j. */
- public void doOnChange() {
- new PropertyConfigurator().doConfigure(
- filename, LogManager.getLoggerRepository());
- }
-}
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]