geronimo-scm mailing list archives

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

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

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

Modified: geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java?rev=579703&r1=579702&r2=579703&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
(original)
+++ geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
Wed Sep 26 08:56:30 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