Author: thomas.diesler(a)jboss.com
Date: 2007-12-20 09:55:00 -0500 (Thu, 20 Dec 2007)
New Revision: 5375
Modified:
stack/cxf/trunk/src/main/resources/jbossws-cxf-config.xml
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpointImpl.java
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/CXFLoggingTestCase.java
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/JDKLoggingTestCase.java
stack/cxf/trunk/src/test/resources/jaxws/cxf/reliable/WEB-INF/jbossws-cxf.xml
Log:
Use org.jboss.wsf.common.logging
Modified: stack/cxf/trunk/src/main/resources/jbossws-cxf-config.xml
===================================================================
--- stack/cxf/trunk/src/main/resources/jbossws-cxf-config.xml 2007-12-20 14:48:10 UTC (rev
5374)
+++ stack/cxf/trunk/src/main/resources/jbossws-cxf-config.xml 2007-12-20 14:55:00 UTC (rev
5375)
@@ -29,6 +29,15 @@
<property name="mbeanServer"><inject
bean="WSMBeanServerLocator"
property="mbeanServer"/></property>
</bean>
+ <!-- Logging redirector -->
+ <bean name="JDKLogRedirector"
class="org.jboss.wsf.common.logging.JDKLogRedirector">
+ <property name="namespaces">
+ <list class="java.util.LinkedList"
elementClass="java.lang.String">
+ <value>org.apache.cxf</value>
+ </list>
+ </property>
+ </bean>
+
<!--
The stack specific deployment aspects
-->
Modified:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpointImpl.java
===================================================================
---
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpointImpl.java 2007-12-20
14:48:10 UTC (rev 5374)
+++
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpointImpl.java 2007-12-20
14:55:00 UTC (rev 5375)
@@ -1,28 +1,30 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxws.cxf.descriptor;
// $Id$
+import java.util.logging.Logger;
+
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@@ -31,9 +33,19 @@
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class DescriptorEndpointImpl
{
+ private Logger jdklog = Logger.getLogger("org.apache.cxf.foo");
+
@WebMethod
public String echo(String input)
{
+ // Test jdk logging redirection to jboss logging
+ jdklog.severe("SEVERE: " + input);
+ jdklog.warning("WARNING: " + input);
+ jdklog.info("INFO: " + input);
+ jdklog.fine("FINE: " + input);
+ jdklog.finer("FINER: " + input);
+ jdklog.finest("FINEST: " + input);
+
return input;
}
}
Modified:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/CXFLoggingTestCase.java
===================================================================
---
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/CXFLoggingTestCase.java 2007-12-20
14:48:10 UTC (rev 5374)
+++
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/CXFLoggingTestCase.java 2007-12-20
14:55:00 UTC (rev 5375)
@@ -25,7 +25,7 @@
import java.util.logging.Logger;
import org.apache.cxf.common.logging.LogUtils;
-import org.jboss.wsf.common.log.JBossLogHandler;
+import org.jboss.wsf.common.logging.JDKLogHandler;
import org.jboss.wsf.test.JBossWSTest;
/**
@@ -52,7 +52,7 @@
int found = 0;
for (Handler handler : log.getHandlers())
{
- if (handler instanceof JBossLogHandler)
+ if (handler instanceof JDKLogHandler)
found++;
}
assertEquals("Expected one jboss handler", 1, found);
Modified:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/JDKLoggingTestCase.java
===================================================================
---
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/JDKLoggingTestCase.java 2007-12-20
14:48:10 UTC (rev 5374)
+++
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/JDKLoggingTestCase.java 2007-12-20
14:55:00 UTC (rev 5375)
@@ -24,7 +24,7 @@
import java.util.logging.Handler;
import java.util.logging.Logger;
-import org.jboss.wsf.common.log.JBossLogHandler;
+import org.jboss.wsf.common.logging.JDKLogHandler;
import org.jboss.wsf.test.JBossWSTest;
/**
@@ -51,7 +51,7 @@
int found = 0;
for (Handler handler : log.getHandlers())
{
- if (handler instanceof JBossLogHandler)
+ if (handler instanceof JDKLogHandler)
found++;
}
assertEquals("Expected one jboss handler", 1, found);
Modified: stack/cxf/trunk/src/test/resources/jaxws/cxf/reliable/WEB-INF/jbossws-cxf.xml
===================================================================
---
stack/cxf/trunk/src/test/resources/jaxws/cxf/reliable/WEB-INF/jbossws-cxf.xml 2007-12-20
14:48:10 UTC (rev 5374)
+++
stack/cxf/trunk/src/test/resources/jaxws/cxf/reliable/WEB-INF/jbossws-cxf.xml 2007-12-20
14:55:00 UTC (rev 5375)
@@ -15,17 +15,14 @@
</wsp:Policy>
<jaxws:endpoint id='TestService'
address='http://@jboss.bind.address@:8080/jaxws-cxf-reliable'
implementor='org.jboss.test.ws.jaxws.cxf.reliable.RMEndpointImpl'>
-
<jaxws:invoker>
<bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>
</jaxws:invoker>
-
<jaxws:features>
<p:policies
namespace="http://www.w3.org/2006/07/ws-policy">
<wsp:PolicyReference URI="#RM"
xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
</p:policies>
</jaxws:features>
-
</jaxws:endpoint>
</beans>
\ No newline at end of file