geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r157213 - geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
Date Sat, 12 Mar 2005 03:00:47 GMT
Author: gdamour
Date: Fri Mar 11 19:00:46 2005
New Revision: 157213

URL: http://svn.apache.org/viewcvs?view=rev&rev=157213
Log:
GERONIMO-607 submitted by John Sisson.

Logging configuration is unnecessarily processed twice at startup.


Modified:
    geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java?view=diff&r1=157212&r2=157213
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
(original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
Fri Mar 11 19:00:46 2005
@@ -87,10 +87,10 @@
      * Construct a <code>Log4jService</code>.
      *
      * @param configurationFile The log4j configuration file.
-     * @param refreshPeroid The refresh refreshPeroid (in seconds).
+     * @param refreshPeriod The refresh refreshPeriod (in seconds).
      */
-    public Log4jService(final String configurationFile, final int refreshPeroid, ServerInfo
serverInfo) {
-        this.refreshPeriod = refreshPeroid;
+    public Log4jService(final String configurationFile, final int refreshPeriod, ServerInfo
serverInfo) {
+        this.refreshPeriod = refreshPeriod;
         this.configurationFile = configurationFile;
         this.serverInfo = serverInfo;
     }
@@ -218,6 +218,7 @@
         }
 
         this.configurationFile = configurationFile;
+        lastChanged = -1;
     }
 
     /**
@@ -343,13 +344,18 @@
         synchronized (this) {
             timer = new Timer(true);
 
-            // Peroidally check the configuration file
+            // Periodically check the configuration file
             schedule();
 
             // Make sure the root Logger has loaded
             LogManager.getRootLogger();
 
             reconfigure();
+
+            File file = resolveConfigurationFile();
+            if (file != null) {
+                lastChanged = file.lastModified();
+            }
         }
 
         // Change all of the loggers over to use log4j



Mime
View raw message