cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r964889 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
Date Fri, 16 Jul 2010 17:58:01 GMT
Author: dkulp
Date: Fri Jul 16 17:58:01 2010
New Revision: 964889

URL: http://svn.apache.org/viewvc?rev=964889&view=rev
Log:
[CXF-2893] Check default classloader for logger class

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java?rev=964889&r1=964888&r2=964889&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java Fri
Jul 16 17:58:01 2010
@@ -95,8 +95,12 @@ public final class LogUtils {
                 }
             }
             if (!StringUtils.isEmpty(cname)) {
-                loggerClass = Class.forName(cname.trim(), true,
-                                            Thread.currentThread().getContextClassLoader());
+                try {
+                    loggerClass = Class.forName(cname.trim(), true,
+                                                Thread.currentThread().getContextClassLoader());
+                } catch (Throwable ex) {
+                    loggerClass = Class.forName(cname.trim());
+                }
                 getLogger(LogUtils.class).fine("Using " + loggerClass.getName() + " for logging.");
             }
         } catch (Throwable ex) {



Mime
View raw message