Author: thomas.diesler(a)jboss.com
Date: 2007-12-19 14:56:24 -0500 (Wed, 19 Dec 2007)
New Revision: 5361
Added:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/CXFLoggingTestCase.java
Modified:
stack/cxf/trunk/src/test/etc/log4j.xml
Log:
Add CXFLoggingTestCase
Modified: stack/cxf/trunk/src/test/etc/log4j.xml
===================================================================
--- stack/cxf/trunk/src/test/etc/log4j.xml 2007-12-19 19:54:56 UTC (rev 5360)
+++ stack/cxf/trunk/src/test/etc/log4j.xml 2007-12-19 19:56:24 UTC (rev 5361)
@@ -56,6 +56,10 @@
<priority value="DEBUG"/>
</category>
+ <category name="org.jboss.test.ws">
+ <priority value="TRACE"/>
+ </category>
+
<category name="org.apache.cxf">
<priority value="DEBUG"/>
</category>
Added:
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
(rev 0)
+++
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/CXFLoggingTestCase.java 2007-12-19
19:56:24 UTC (rev 5361)
@@ -0,0 +1,60 @@
+/*
+ * 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.logging;
+
+import java.util.logging.Handler;
+import java.util.logging.Logger;
+
+import org.apache.cxf.common.logging.LogUtils;
+import org.jboss.wsf.common.log.JBossLogHandler;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * Test redirection of CXF logging on the client side
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2007
+ */
+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");
+ }
+
+ private void assertHandlers(Logger log)
+ {
+ int found = 0;
+ for (Handler handler : log.getHandlers())
+ {
+ if (handler instanceof JBossLogHandler)
+ found++;
+ }
+ assertEquals("Expected one jboss handler", 1, found);
+ }
+}
\ No newline at end of file
Property changes on:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/CXFLoggingTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF