Author: dkulp
Date: Tue Oct 27 16:44:23 2009
New Revision: 830242

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

........
  r830239 | dkulp | 2009-10-27 12:38:17 -0400 (Tue, 27 Oct 2009) | 2 lines
  
  [CXF-2501] Detect where slf4j is logging and try and do the same
  Also fix version of slf4j-api jar being picked up
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
    cxf/branches/2.2.x-fixes/parent/pom.xml
    cxf/branches/2.2.x-fixes/rt/javascript/pom.xml
    cxf/branches/2.2.x-fixes/rt/transports/http-jetty/pom.xml
    
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java

Propchange: cxf/branches/2.2.x-fixes/
            ('svn:mergeinfo' removed)

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

Modified: 
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java?rev=830242&r1=830241&r2=830242&view=diff
==============================================================================
--- 
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
 (original)
+++ 
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
 Tue Oct 27 16:44:23 2009
@@ -76,6 +76,20 @@
                     cname = din.readLine();
                 }
             }
+            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";
+                    }
+                }
+            }
             if (!StringUtils.isEmpty(cname)) {
                 loggerClass = Class.forName(cname, true,
                                             
Thread.currentThread().getContextClassLoader());

Modified: cxf/branches/2.2.x-fixes/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/parent/pom.xml?rev=830242&r1=830241&r2=830242&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/parent/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/parent/pom.xml Tue Oct 27 16:44:23 2009
@@ -559,6 +559,11 @@
                 <version>1.5.8</version>
             </dependency>
             <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>1.5.8</version>
+            </dependency>
+            <dependency>
                 <groupId>org.mortbay.jetty</groupId>
                 <artifactId>jetty</artifactId>
                 <version>${jetty.version}</version>

Modified: cxf/branches/2.2.x-fixes/rt/javascript/pom.xml
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/javascript/pom.xml?rev=830242&r1=830241&r2=830242&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/javascript/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/rt/javascript/pom.xml Tue Oct 27 16:44:23 2009
@@ -98,6 +98,11 @@
             <artifactId>slf4j-jdk14</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>

Modified: cxf/branches/2.2.x-fixes/rt/transports/http-jetty/pom.xml
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/http-jetty/pom.xml?rev=830242&r1=830241&r2=830242&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/http-jetty/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/rt/transports/http-jetty/pom.xml Tue Oct 27 
16:44:23 2009
@@ -92,6 +92,11 @@
             <artifactId>slf4j-jdk14</artifactId>
             <scope>runtime</scope>
         </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>runtime</scope>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>

Modified: 
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java?rev=830242&r1=830241&r2=830242&view=diff
==============================================================================
--- 
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
 (original)
+++ 
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
 Tue Oct 27 16:44:23 2009
@@ -47,7 +47,7 @@
     
     @BeforeClass
     public static void startServers() throws Exception {
-        assertTrue("server did not launch correctly", 
launchServer(AegisServer.class, true));
+        assertTrue("server did not launch correctly", 
launchServer(AegisServer.class));
     }
     
     @Test


Reply via email to