Author: alessio.soldano(a)jboss.com
Date: 2010-06-09 13:36:39 -0400 (Wed, 09 Jun 2010)
New Revision: 12452
Added:
stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/CXFLoggingTestCase.java
Log:
[JBWS-3062] Use CXF Log4jLogger
Added:
stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
===================================================================
--- stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
(rev 0)
+++
stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger 2010-06-09
17:36:39 UTC (rev 12452)
@@ -0,0 +1 @@
+org.apache.cxf.common.logging.Log4jLogger
\ No newline at end of file
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/CXFLoggingTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/CXFLoggingTestCase.java 2010-06-09
17:26:06 UTC (rev 12451)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/CXFLoggingTestCase.java 2010-06-09
17:36:39 UTC (rev 12452)
@@ -21,40 +21,24 @@
*/
package org.jboss.test.ws.jaxws.cxf.logging;
-import java.util.logging.Handler;
import java.util.logging.Logger;
+import org.apache.cxf.common.logging.Log4jLogger;
import org.apache.cxf.common.logging.LogUtils;
-import org.jboss.wsf.common.logging.JDKLogHandler;
import org.jboss.wsf.test.JBossWSTest;
/**
- * Test redirection of CXF logging on the client side
+ * Test CXF logging on the client side uses Log4J
*
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2007
+ * @author alessio.soldano(a)jboss.com
+ * @since 09-Jun-2010
*/
public class CXFLoggingTestCase extends JBossWSTest
{
public void testLogging() throws Exception
{
Logger log = LogUtils.getL7dLogger(CXFLoggingTestCase.class);
- assertHandlers(log);
- log = LogUtils.getL7dLogger(CXFLoggingTestCase.class);
- assertHandlers(log);
-
- log.finest("test message");
+ assertTrue("Expected an instance of " + Log4jLogger.class, log instanceof
Log4jLogger);
}
-
- private void assertHandlers(Logger log)
- {
- int found = 0;
- for (Handler handler : log.getHandlers())
- {
- if (handler instanceof JDKLogHandler)
- found++;
- }
- assertEquals("Expected one jboss handler", 1, found);
- }
}