geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r783189 - in /geronimo/server/trunk: framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/ plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/
Date Wed, 10 Jun 2009 02:59:31 GMT
Author: xuhaihong
Date: Wed Jun 10 02:59:31 2009
New Revision: 783189

URL: http://svn.apache.org/viewvc?rev=783189&view=rev
Log:
GERONIMO-3768 deployment failure is not logged in either geronimo.log or deployer.log (Patch
from Han Hong Fang)

Modified:
    geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/DeployTool.java
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java

Modified: geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/DeployTool.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/DeployTool.java?rev=783189&r1=783188&r2=783189&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/DeployTool.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/DeployTool.java
Wed Jun 10 02:59:31 2009
@@ -54,6 +54,9 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.util.Main;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import jline.ConsoleReader;
 
 
@@ -72,6 +75,7 @@
 public class DeployTool implements Main {
 
     private static final IdentityHashMap<CommandMetaData, DeployCommand> commands =
new IdentityHashMap<CommandMetaData, DeployCommand>();
+    private static final Logger log = LoggerFactory.getLogger(DeployTool.class);
 
     static {
         commands.put(LoginCommandMetaData.META_DATA, new CommandLogin());
@@ -208,11 +212,8 @@
     }
 
     private void processException(PrintWriter out, Exception e) {
-        failed = true;
-        out.print(DeployUtils.reformat("Error: "+e.getMessage(),4,72));
-        if(e.getCause() != null) {
-            e.getCause().printStackTrace(out);
-        }
+        failed = true;       
+        log.error("Error: ", e);
     }
 
     public static final GBeanInfo GBEAN_INFO;

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java?rev=783189&r1=783188&r2=783189&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
Wed Jun 10 02:59:31 2009
@@ -140,8 +140,9 @@
                 if(isRedeploy) {
                     TargetModuleID[] targets = identifyTargets(moduleFile, planFile, mgr.getAvailableModules(null,
all));
                     if(targets.length == 0) {
-                    	addErrorMessage(actionRequest, getLocalizedString(actionRequest, "plugin.errorMsg04"),
null);
-                    	return;
+                        addErrorMessage(actionRequest, getLocalizedString(actionRequest,
"plugin.errorMsg04"), null);
+                        log.error(getLocalizedString(actionRequest, "plugin.errorMsg04"));
+                        return;
                     }
                     progress = mgr.redeploy(targets, moduleFile, planFile);
                 } else {
@@ -169,6 +170,7 @@
                             abbrStatusMessage = getLocalizedString(actionRequest, "plugin.errorMsg02");
                             fullStatusMessage = progress.getDeploymentStatus().getMessage();
                             addErrorMessage(actionRequest, abbrStatusMessage, fullStatusMessage);
+                            log.error(abbrStatusMessage + "\n" + fullStatusMessage);
                         }
                     }
                 } else {
@@ -177,6 +179,7 @@
                     // after the first line, which in most cases means the gnarly stacktrace
                     abbrStatusMessage = getLocalizedString(actionRequest, "plugin.errorMsg01");
                     addErrorMessage(actionRequest, abbrStatusMessage, fullStatusMessage);
+                    log.error(abbrStatusMessage + "\n" + fullStatusMessage);
                     // try to provide an upgraded version of the plan
                     try {
                         if (planFile != null && planFile.exists()) {
@@ -250,7 +253,7 @@
         } catch (IOException e) {
             throw new PortletException("Unable to read input files: "+e.getMessage());
         } catch (DeploymentException e) {
-        	return new TargetModuleID[0];
+            return new TargetModuleID[0];
         }
         return (TargetModuleID[]) modules.toArray(new TargetModuleID[modules.size()]);
     }



Mime
View raw message