cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1301549 - in /cxf/branches/2.5.x-fixes: ./ common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
Date Fri, 16 Mar 2012 14:38:18 GMT
Author: ningjiang
Date: Fri Mar 16 14:38:18 2012
New Revision: 1301549

URL: http://svn.apache.org/viewvc?rev=1301549&view=rev
Log:
Merged revisions 1301539 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1301539 | ningjiang | 2012-03-16 22:18:01 +0800 (Fri, 16 Mar 2012) | 1 line
  
  CXF-4180 LogUtils should default to CXF's Slf4jLogger if it can't find Log4J or JCL driver
........

Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:1301539

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java?rev=1301549&r1=1301548&r2=1301549&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
(original)
+++ cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
Fri Mar 16 14:38:18 2012
@@ -97,17 +97,8 @@ public final class LogUtils {
             }
             if (StringUtils.isEmpty(cname)) {
                 Class.forName("org.slf4j.impl.StaticLoggerBinder");
-                Class<?> cls = Class.forName("org.slf4j.LoggerFactory");
-                Class<?> fcls = cls.getMethod("getILoggerFactory").invoke(null).getClass();
-                if (fcls.getName().contains("Log4j")) {
-                    cname = "org.apache.cxf.common.logging.Log4jLogger";
-                } else if (fcls.getName().contains("JCL")) {
-                    cls = Class.forName("org.apache.commons.logging.LogFactory");
-                    fcls = cls.getMethod("getFactory").invoke(null).getClass();
-                    if (fcls.getName().contains("Log4j")) {
-                        cname = "org.apache.cxf.common.logging.Log4jLogger";
-                    }
-                }
+                // using the Slf4jLogger directly
+                cname = "org.apache.cxf.common.logging.Slf4jLogger";
             }
             if (!StringUtils.isEmpty(cname)) {
                 try {



Mime
View raw message