geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r289878 - in /geronimo/trunk: applications/console-standard/src/java/org/apache/geronimo/console/logmanager/ applications/console-standard/src/java/org/apache/geronimo/console/util/ modules/system/src/java/org/apache/geronimo/system/logging...
Date Sun, 18 Sep 2005 01:01:46 GMT
Author: ammulder
Date: Sat Sep 17 18:01:36 2005
New Revision: 289878

URL: http://svn.apache.org/viewcvs?rev=289878&view=rev
Log:
Update the request log GBean name (GERONIMO-1006)
Update the log portlet and GBean so only changed parameters are set
  (GERONIMO-846), thanks to Joe Bohn for patch

Modified:
    geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/logmanager/LogManagerPortlet.java
    geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/util/ObjectNameConstants.java
    geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java

Modified: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/logmanager/LogManagerPortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/logmanager/LogManagerPortlet.java?rev=289878&r1=289877&r2=289878&view=diff
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/logmanager/LogManagerPortlet.java
(original)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/logmanager/LogManagerPortlet.java
Sat Sep 17 18:01:36 2005
@@ -74,13 +74,21 @@
         String configFile = actionRequest.getParameter("configFile");
         String configuration = actionRequest.getParameter("append");
         String refreshPeriod = actionRequest.getParameter("refreshPeriod");
+        String currentLevel = log.getRootLoggerLevel();
 
         if ("update".equals(action)) {
             if (refreshPeriod != null) {
-                log.setRefreshPeriodSeconds(Integer.parseInt(refreshPeriod));
+                int refreshPeriodInt = Integer.parseInt(refreshPeriod);
+                if (refreshPeriodInt != log.getRefreshPeriodSeconds()) {
+                    log.setRefreshPeriodSeconds(refreshPeriodInt);
+                }
+            }
+            if (!log.getConfigFileName().equals(configFile)) {
+                log.setConfigFileName(configFile);
+            }
+            if (!currentLevel.equals(logLevel)) {
+                log.setRootLoggerLevel(logLevel);
             }
-            log.setConfigFileName(configFile);
-            log.setRootLoggerLevel(logLevel);
         }
     }
 }

Modified: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/util/ObjectNameConstants.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/util/ObjectNameConstants.java?rev=289878&r1=289877&r2=289878&view=diff
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/util/ObjectNameConstants.java
(original)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/util/ObjectNameConstants.java
Sat Sep 17 18:01:36 2005
@@ -28,24 +28,17 @@
 
     public static final String ROOT_LOGGER_OBJECT_NAME = "geronimo.server:name=Logger,J2EEServer=geronimo,J2EEApplication=null,j2eeType=GBean,J2EEModule=org/apache/geronimo/System";
 
-    public static final String REQUEST_LOGGER_OBJECT_NAME = "geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2eeType=GBean,name=JettyRequestLog";
+    public static final String REQUEST_LOGGER_OBJECT_NAME = "geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Jetty,J2EEServer=geronimo,j2eeType=GBean,name=JettyRequestLog";
 
     public static final String DERBY_OBJECT_NAME = "geronimo.server:name=DerbySystem,J2EEServer=geronimo,J2EEApplication=null,j2eeType=GBean,J2EEModule=null";
 
     public static final String REPO_OBJECT_NAME = "geronimo.server:name=Repository,J2EEServer=geronimo,J2EEApplication=null,j2eeType=GBean,J2EEModule=org/apache/geronimo/System";
 
-    public static final String WEBCONTAINER_OBJECT_NAME = "geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2eeType=GBean,name=WebContainer";
-
     public static final String SERVER_INFO_OBJECT_NAME = "geronimo.server:name=ServerInfo,J2EEServer=geronimo,J2EEApplication=null,j2eeType=GBean,J2EEModule=org/apache/geronimo/System";
 
     public static final String JVM_IMPL_NAME = "geronimo.server:j2eeType=JVM,J2EEServer=geronimo,name=JVM";
 
     public static final String DEPLOYER_OBJECT_NAME = "geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/RuntimeDeployer,J2EEServer=geronimo,j2eeType=Deployer,name=Deployer";
-
-    public static final String JETTY_HTTP_CONNECTOR_NAME = "geronimo.server:J2EEServer=geronimo,j2eeType=GBean,name=JettyWebConnector,*";
-
-    // TODO: Put the appropriate name here
-    public static final String JETTY_HTTPS_CONNECTOR_NAME = "geronimo.server:name=JettyWebConnector.HTTPS.8443,J2EEServer=geronimo,j2eeType=GBean,*";
 
     public static final String JCA_MANAGED_CF_QUERY = "*:j2eeType=JCAManagedConnectionFactory,*";
 

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?rev=289878&r1=289877&r2=289878&view=diff
==============================================================================
--- 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
Sat Sep 17 18:01:36 2005
@@ -149,7 +149,13 @@
      * @param level The level to change the logger to.
      */
     public synchronized void setRootLoggerLevel(final String level) {
-        LogManager.getRootLogger().setLevel(XLevel.toLevel(level));
+
+        String currentLevel = this.getRootLoggerLevel();
+
+        // ensure that the level has really been changed
+        if (!currentLevel.equals(level)) {
+            LogManager.getRootLogger().setLevel(XLevel.toLevel(level));
+        }
     }
 
     /**
@@ -252,8 +258,11 @@
             throw new IllegalArgumentException("configurationFile is null");
         }
 
-        this.configurationFile = configurationFile;
-        lastChanged = -1;
+        // ensure that the file name has really been updated
+        if (!this.configurationFile.equals(configurationFile)) {
+            this.configurationFile = configurationFile;
+            lastChanged = -1;
+        }
     }
 
     /**



Mime
View raw message