james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rouaz...@apache.org
Subject [11/13] james-project git commit: JAMES-1858: Add printing stashtrace when global exception
Date Wed, 07 Dec 2016 08:53:39 GMT
JAMES-1858: Add printing stashtrace when global exception


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/116bcadc
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/116bcadc
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/116bcadc

Branch: refs/heads/master
Commit: 116bcadc25342b10ee4cc0d16208ade2b61d0ac0
Parents: 4b2604c
Author: Quynh Nguyen <qnguyen@linagora.com>
Authored: Tue Nov 15 17:34:03 2016 +0700
Committer: Quynh Nguyen <qnguyen@linagora.com>
Committed: Wed Dec 7 14:03:53 2016 +0700

----------------------------------------------------------------------
 server/container/cli/pom.xml                                   | 5 +++++
 .../cli/src/main/java/org/apache/james/cli/ServerCmd.java      | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/116bcadc/server/container/cli/pom.xml
----------------------------------------------------------------------
diff --git a/server/container/cli/pom.xml b/server/container/cli/pom.xml
index c1bbbd7..33a2d4e 100644
--- a/server/container/cli/pom.xml
+++ b/server/container/cli/pom.xml
@@ -54,6 +54,11 @@
             <artifactId>commons-cli</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
             <groupId>org.assertj</groupId>
             <artifactId>assertj-core</artifactId>
             <version>${assertj-1.version}</version>

http://git-wip-us.apache.org/repos/asf/james-project/blob/116bcadc/server/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
----------------------------------------------------------------------
diff --git a/server/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java b/server/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
index 227099a..539f2be 100644
--- a/server/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
+++ b/server/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
@@ -46,6 +46,8 @@ import org.apache.james.cli.type.CmdType;
 import org.apache.james.cli.utils.ValueWithUnit;
 import org.apache.james.mailbox.model.Quota;
 import org.apache.james.rrt.lib.Mappings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Joiner;
@@ -60,6 +62,7 @@ public class ServerCmd {
     public static final String PORT_OPT_SHORT = "p";
 
     private static final int DEFAULT_PORT = 9999;
+    private static final Logger LOG = LoggerFactory.getLogger(ServerCmd.class);
 
     private static Options createOptions() {
         Options options = new Options();
@@ -102,7 +105,8 @@ public class ServerCmd {
         } catch (IOException ioe) {
             failWithMessage("Error connecting to remote JMX agent : " + ioe.getMessage());
         } catch (Exception e) {
-            failWithMessage("Error while executing command:" + e.getMessage());
+            LOG.error("Error on command: {}", e);
+            failWithMessage("Error " + e.getClass() + " while executing command:" + e.getMessage());
         }
 
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message