geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r579697 - /geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
Date Wed, 26 Sep 2007 15:35:56 GMT
Author: dwoods
Date: Wed Sep 26 08:35:55 2007
New Revision: 579697

URL: http://svn.apache.org/viewvc?rev=579697&view=rev
Log:
GERONIMO-1746 Cannot override default configurationFile value in Log4jService GBean

Modified:
    geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java

Modified: geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java?rev=579697&r1=579696&r2=579697&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
Wed Sep 26 08:35:55 2007
@@ -86,6 +86,8 @@
 
     private final static Log log = LogFactory.getLog(Log4jService.class);
 
+    private static final String LOG4JSERVICE_CONFIG_PROPERTY = "org.apache.geronimo.log4jservice.configuration";
+
     /**
      * The URL to the configuration file.
      */
@@ -570,6 +572,14 @@
                 if (!(geronimoLogFactory.getLogFactory() instanceof CachingLog4jLogFactory))
{
                     geronimoLogFactory.setLogFactory(new CachingLog4jLogFactory());
                 }
+            }
+
+            // Allow users to override the configurationFile which is hardcoded
+            // in config.ser and cannot be updated by config.xml, as the
+            // AttrbiuteManager comes up after this GBean
+            String cfgFile = System.getProperty(LOG4JSERVICE_CONFIG_PROPERTY);
+            if ((cfgFile != null) && (!cfgFile.equals(""))) {
+                this.configurationFile = cfgFile;
             }
 
             synchronized (this) {



Mime
View raw message