geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r158401 - geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
Date Mon, 21 Mar 2005 03:11:02 GMT
Author: jboynes
Date: Sun Mar 20 19:11:02 2005
New Revision: 158401

URL: http://svn.apache.org/viewcvs?view=rev&rev=158401
Log:
dont fail hard if we have the wrong log factory, just dont enable the monitors

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=158400&r2=158401
==============================================================================
--- 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
Sun Mar 20 19:11:02 2005
@@ -337,32 +337,30 @@
 
     public void doStart() {
         LogFactory logFactory = LogFactory.getFactory();
-        if (!(logFactory instanceof GeronimoLogFactory)) {
-            throw new IllegalStateException("Commons log factory: " + logFactory + " is not
a GeronimoLogFactory");
-        }
-
-        synchronized (this) {
-            timer = new Timer(true);
-
-            // 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();
+        if (logFactory instanceof GeronimoLogFactory) {
+            synchronized (this) {
+                timer = new Timer(true);
+
+                // 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
-        GeronimoLogFactory geronimoLogFactory = (GeronimoLogFactory) logFactory;
-        synchronized (geronimoLogFactory) {
-            if (!(geronimoLogFactory.getLogFactory() instanceof CachingLog4jLogFactory))
{
-                geronimoLogFactory.setLogFactory(new CachingLog4jLogFactory());
+            // Change all of the loggers over to use log4j
+            GeronimoLogFactory geronimoLogFactory = (GeronimoLogFactory) logFactory;
+            synchronized (geronimoLogFactory) {
+                if (!(geronimoLogFactory.getLogFactory() instanceof CachingLog4jLogFactory))
{
+                    geronimoLogFactory.setLogFactory(new CachingLog4jLogFactory());
+                }
             }
         }
 



Mime
View raw message