cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [3/4] git commit: Add some debug logging if an optional extension isn't loaded
Date Thu, 12 Jun 2014 17:18:38 GMT
Add some debug logging if an optional extension isn't loaded


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7fbe3b69
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7fbe3b69
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7fbe3b69

Branch: refs/heads/master
Commit: 7fbe3b69b4e43f49cdfffc3c812c8d2ed29b3275
Parents: 44b35f1
Author: Daniel Kulp <dkulp@apache.org>
Authored: Thu Jun 12 13:07:10 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Jun 12 13:18:21 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/bus/extension/Extension.java   | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7fbe3b69/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/extension/Extension.java b/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
index 4722069..d608a14 100644
--- a/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
+++ b/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
@@ -24,6 +24,7 @@ import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.apache.cxf.Bus;
@@ -242,12 +243,16 @@ public class Extension {
             notFound = true;
             if (!optional) {
                 throw ex;
+            } else {
+                LOG.log(Level.FINE, "Could not load optional extension " + getName(), (Throwable)ex);
             }
         } catch (InvocationTargetException ex) {
             notFound = true;
             if (!optional) {
                 throw new ExtensionException(new Message("PROBLEM_CREATING_EXTENSION_CLASS",
LOG, cls.getName()), 
                                              ex.getCause());
+            } else {
+                LOG.log(Level.FINE, "Could not load optional extension " + getName(), (Throwable)ex);
             }
         } catch (NoSuchMethodException ex) {
             notFound = true;
@@ -261,11 +266,15 @@ public class Extension {
             if (!optional) {
                 throw new ExtensionException(new Message("PROBLEM_FINDING_CONSTRUCTOR", LOG,
                                                          cls.getName(), a), ex);
+            } else {
+                LOG.log(Level.FINE, "Could not load optional extension " + getName(), (Throwable)ex);
             }
         } catch (Throwable e) {
             notFound = true;
             if (!optional) {
                 throw new ExtensionException(new Message("PROBLEM_CREATING_EXTENSION_CLASS",
LOG, cls.getName()), e);
+            } else {
+                LOG.log(Level.FINE, "Could not load optional extension " + getName(), (Throwable)e);
             }
         }
         return obj;


Mime
View raw message