cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/5] git commit: Add some debug logging if an optional extension isn't loaded
Date Fri, 13 Jun 2014 15:29:36 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/5d717eeb
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5d717eeb
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5d717eeb

Branch: refs/heads/2.7.x-fixes
Commit: 5d717eeb37bbc36c3891acae559830c696f7e428
Parents: 22e6b39
Author: Daniel Kulp <dkulp@apache.org>
Authored: Thu Jun 12 13:07:10 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Jun 13 11:04:56 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/5d717eeb/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
----------------------------------------------------------------------
diff --git a/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java b/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
index 4722069..d608a14 100644
--- a/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
+++ b/rt/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