cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1181904 - in /cxf/trunk/services/wsn/wsn-core: ./ src/main/java/org/apache/cxf/wsn/ src/main/java/org/apache/cxf/wsn/jaxws/ src/main/java/org/apache/cxf/wsn/jms/ src/main/java/org/apache/cxf/wsn/util/ src/test/resources/
Date Tue, 11 Oct 2011 17:23:37 GMT
Author: dkulp
Date: Tue Oct 11 17:23:36 2011
New Revision: 1181904

URL: http://svn.apache.org/viewvc?rev=1181904&view=rev
Log:
Switch to CXF logging standards and quiet the tests

Removed:
    cxf/trunk/services/wsn/wsn-core/src/test/resources/log4j.properties
Modified:
    cxf/trunk/services/wsn/wsn-core/pom.xml
    cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractCreatePullPoint.java
    cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractNotificationBroker.java
    cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractPullPoint.java
    cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jaxws/JaxwsPublisher.java
    cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsPublisher.java
    cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsPullPoint.java
    cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsSubscription.java
    cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/util/DOMUtil.java
    cxf/trunk/services/wsn/wsn-core/src/test/resources/logging.properties

Modified: cxf/trunk/services/wsn/wsn-core/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-core/pom.xml?rev=1181904&r1=1181903&r2=1181904&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-core/pom.xml (original)
+++ cxf/trunk/services/wsn/wsn-core/pom.xml Tue Oct 11 17:23:36 2011
@@ -34,11 +34,6 @@
 
 	<dependencies>
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>1.6.1</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jms_1.1_spec</artifactId>
             <version>1.1.1</version>
@@ -79,8 +74,7 @@
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>1.6.1</version>
+            <artifactId>slf4j-jdk14</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>

Modified: cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractCreatePullPoint.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractCreatePullPoint.java?rev=1181904&r1=1181903&r2=1181904&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractCreatePullPoint.java
(original)
+++ cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractCreatePullPoint.java
Tue Oct 11 17:23:36 2011
@@ -21,6 +21,9 @@ package org.apache.cxf.wsn;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 import javax.jws.WebMethod;
 import javax.jws.WebParam;
 import javax.jws.WebResult;
@@ -28,6 +31,7 @@ import javax.jws.WebService;
 
 import org.w3c.dom.Element;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.wsn.util.DOMUtil;
 import org.apache.cxf.wsn.util.IdGenerator;
 import org.oasis_open.docs.wsn.b_2.CreatePullPointResponse;
@@ -35,13 +39,11 @@ import org.oasis_open.docs.wsn.b_2.Unabl
 import org.oasis_open.docs.wsn.bw_2.CreatePullPoint;
 import org.oasis_open.docs.wsn.bw_2.UnableToCreatePullPointFault;
 import org.oasis_open.docs.wsn.bw_2.UnableToDestroyPullPointFault;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 @WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.CreatePullPoint")
 public abstract class AbstractCreatePullPoint extends AbstractEndpoint implements CreatePullPoint
{
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCreatePullPoint.class);
+    private static final Logger LOGGER = LogUtils.getL7dLogger(AbstractCreatePullPoint.class);
 
     private IdGenerator idGenerator;
 
@@ -72,7 +74,7 @@ public abstract class AbstractCreatePull
             org.oasis_open.docs.wsn.b_2.CreatePullPoint createPullPointRequest)
         throws UnableToCreatePullPointFault {
 
-        LOGGER.debug("CreatePullEndpoint");
+        LOGGER.finest("CreatePullEndpoint");
         return handleCreatePullPoint(createPullPointRequest, null);
     }
 
@@ -95,7 +97,7 @@ public abstract class AbstractCreatePull
             success = true;
             return response;
         } catch (EndpointRegistrationException e) {
-            LOGGER.warn("Unable to register new endpoint", e);
+            LOGGER.log(Level.WARNING, "Unable to register new endpoint", e);
             UnableToCreatePullPointFaultType fault = new UnableToCreatePullPointFaultType();
             throw new UnableToCreatePullPointFault("Unable to register new endpoint", fault,
e);
         } finally {
@@ -104,7 +106,7 @@ public abstract class AbstractCreatePull
                 try {
                     pullPoint.destroy();
                 } catch (UnableToDestroyPullPointFault e) {
-                    LOGGER.info("Error destroying pullPoint", e);
+                    LOGGER.log(Level.INFO, "Error destroying pullPoint", e);
                 }
             }
         }

Modified: cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractNotificationBroker.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractNotificationBroker.java?rev=1181904&r1=1181903&r2=1181904&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractNotificationBroker.java
(original)
+++ cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractNotificationBroker.java
Tue Oct 11 17:23:36 2011
@@ -21,6 +21,9 @@ package org.apache.cxf.wsn;
 import java.net.URI;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 import javax.jws.Oneway;
 import javax.jws.WebMethod;
 import javax.jws.WebParam;
@@ -29,6 +32,7 @@ import javax.jws.WebService;
 import javax.xml.namespace.QName;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.wsn.util.IdGenerator;
 import org.apache.cxf.wsn.util.WSNHelper;
 import org.oasis_open.docs.wsn.b_2.GetCurrentMessage;
@@ -65,8 +69,6 @@ import org.oasis_open.docs.wsrf.rpw_2.Ge
 import org.oasis_open.docs.wsrf.rpw_2.InvalidResourcePropertyQNameFault;
 import org.oasis_open.docs.wsrf.rw_2.ResourceUnavailableFault;
 import org.oasis_open.docs.wsrf.rw_2.ResourceUnknownFault;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 @WebService(endpointInterface = "org.oasis_open.docs.wsn.brw_2.NotificationBroker")
 public abstract class AbstractNotificationBroker extends AbstractEndpoint 
@@ -80,7 +82,7 @@ public abstract class AbstractNotificati
         = new QName(NAMESPACE_URI, "TopicExpressionDialect", PREFIX);
     public static final QName TOPIC_SET_QNAME = new QName(NAMESPACE_URI, "TopicSet", PREFIX);
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(AbstractNotificationBroker.class);
+    private static final Logger LOGGER = LogUtils.getL7dLogger(AbstractNotificationBroker.class);
 
     private IdGenerator idGenerator;
 
@@ -121,7 +123,7 @@ public abstract class AbstractNotificati
                       partName = "Notify")
             Notify notify) {
 
-        LOGGER.debug("Notify");
+        LOGGER.finest("Notify");
         handleNotify(notify);
     }
 
@@ -178,7 +180,7 @@ public abstract class AbstractNotificati
             UnrecognizedPolicyRequestFault {
         //CHECKSTYLE:ON
 
-        LOGGER.debug("Subscribe");
+        LOGGER.finest("Subscribe");
         return handleSubscribe(subscribeRequest, null);
     }
 
@@ -208,7 +210,7 @@ public abstract class AbstractNotificati
             success = true;
             return response;
         } catch (EndpointRegistrationException e) {
-            LOGGER.warn("Unable to register new endpoint", e);
+            LOGGER.log(Level.WARNING, "Unable to register new endpoint", e);
             SubscribeCreationFailedFaultType fault = new SubscribeCreationFailedFaultType();
             throw new SubscribeCreationFailedFault("Unable to register new endpoint", fault,
e);
         } finally {
@@ -217,7 +219,7 @@ public abstract class AbstractNotificati
                 try {
                     subscription.unsubscribe();
                 } catch (UnableToDestroySubscriptionFault e) {
-                    LOGGER.info("Error destroying subscription", e);
+                    LOGGER.log(Level.INFO, "Error destroying subscription", e);
                 }
             }
         }
@@ -255,7 +257,7 @@ public abstract class AbstractNotificati
             MultipleTopicsSpecifiedFault, NoCurrentMessageOnTopicFault, ResourceUnknownFault,
             TopicExpressionDialectUnknownFault, TopicNotSupportedFault {
         //CHECKSTYLE:ON
-        LOGGER.debug("GetCurrentMessage");
+        LOGGER.finest("GetCurrentMessage");
         NoCurrentMessageOnTopicFaultType fault = new NoCurrentMessageOnTopicFaultType();
         throw new NoCurrentMessageOnTopicFault("There is no current message on this topic.",
fault);
     }
@@ -282,7 +284,7 @@ public abstract class AbstractNotificati
             PublisherRegistrationFailedFault, PublisherRegistrationRejectedFault, ResourceUnknownFault,
             TopicNotSupportedFault {
 
-        LOGGER.debug("RegisterPublisher");
+        LOGGER.finest("RegisterPublisher");
         return handleRegisterPublisher(registerPublisherRequest);
     }
 
@@ -302,7 +304,7 @@ public abstract class AbstractNotificati
             success = true;
             return response;
         } catch (EndpointRegistrationException e) {
-            LOGGER.warn("Unable to register new endpoint", e);
+            LOGGER.log(Level.WARNING, "Unable to register new endpoint", e);
             PublisherRegistrationFailedFaultType fault = new PublisherRegistrationFailedFaultType();
             throw new PublisherRegistrationFailedFault("Unable to register new endpoint",
fault, e);
         } finally {
@@ -310,7 +312,7 @@ public abstract class AbstractNotificati
                 try {
                     publisher.destroy();
                 } catch (ResourceNotDestroyedFault e) {
-                    LOGGER.info("Error destroying publisher", e);
+                    LOGGER.log(Level.INFO, "Error destroying publisher", e);
                 }
             }
         }
@@ -331,7 +333,7 @@ public abstract class AbstractNotificati
         javax.xml.namespace.QName getResourcePropertyRequest
     ) throws ResourceUnavailableFault, ResourceUnknownFault, InvalidResourcePropertyQNameFault
{
 
-        LOGGER.debug("GetResourceProperty");
+        LOGGER.finest("GetResourceProperty");
         return handleGetResourceProperty(getResourcePropertyRequest);
     }
 

Modified: cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractPullPoint.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractPullPoint.java?rev=1181904&r1=1181903&r2=1181904&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractPullPoint.java
(original)
+++ cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractPullPoint.java
Tue Oct 11 17:23:36 2011
@@ -20,6 +20,7 @@ package org.apache.cxf.wsn;
 
 import java.math.BigInteger;
 import java.util.List;
+import java.util.logging.Logger;
 
 import javax.jws.Oneway;
 import javax.jws.WebMethod;
@@ -27,6 +28,7 @@ import javax.jws.WebParam;
 import javax.jws.WebResult;
 import javax.jws.WebService;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.oasis_open.docs.wsn.b_2.CreatePullPoint;
 import org.oasis_open.docs.wsn.b_2.DestroyPullPoint;
 import org.oasis_open.docs.wsn.b_2.DestroyPullPointResponse;
@@ -41,13 +43,11 @@ import org.oasis_open.docs.wsn.bw_2.Unab
 import org.oasis_open.docs.wsn.bw_2.UnableToDestroyPullPointFault;
 import org.oasis_open.docs.wsn.bw_2.UnableToGetMessagesFault;
 import org.oasis_open.docs.wsrf.rw_2.ResourceUnknownFault;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 @WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.PullPoint")
 public abstract class AbstractPullPoint extends AbstractEndpoint implements PullPoint, NotificationConsumer
{
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(AbstractPullPoint.class);
+    private static final Logger LOGGER = LogUtils.getL7dLogger(AbstractPullPoint.class);
 
     protected AbstractCreatePullPoint createPullPoint;
 
@@ -67,7 +67,7 @@ public abstract class AbstractPullPoint 
                       partName = "Notify")
             Notify notify) {
 
-        LOGGER.debug("Notify");
+        LOGGER.finest("Notify");
         for (NotificationMessageHolderType messageHolder : notify.getNotificationMessage())
{
             store(messageHolder);
         }
@@ -90,7 +90,7 @@ public abstract class AbstractPullPoint 
                       partName = "GetMessagesRequest")
             GetMessages getMessagesRequest) throws ResourceUnknownFault, UnableToGetMessagesFault
{
 
-        LOGGER.debug("GetMessages");
+        LOGGER.finest("GetMessages");
         BigInteger max = getMessagesRequest.getMaximumNumber();
         List<NotificationMessageHolderType> messages = getMessages(max != null ? max.intValue()
: 0);
         GetMessagesResponse response = new GetMessagesResponse();
@@ -116,7 +116,7 @@ public abstract class AbstractPullPoint 
             DestroyPullPoint destroyPullPointRequest) 
         throws ResourceUnknownFault, UnableToDestroyPullPointFault {
 
-        LOGGER.debug("Destroy");
+        LOGGER.finest("Destroy");
         createPullPoint.destroyPullPoint(getAddress());
         return new DestroyPullPointResponse();
     }

Modified: cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jaxws/JaxwsPublisher.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jaxws/JaxwsPublisher.java?rev=1181904&r1=1181903&r2=1181904&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jaxws/JaxwsPublisher.java
(original)
+++ cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jaxws/JaxwsPublisher.java
Tue Oct 11 17:23:36 2011
@@ -18,9 +18,13 @@
  */
 package org.apache.cxf.wsn.jaxws;
 
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 import javax.jws.WebService;
 import javax.xml.bind.JAXBElement;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.wsn.AbstractSubscription;
 import org.apache.cxf.wsn.jms.JmsPublisher;
 import org.apache.cxf.wsn.util.WSNHelper;
@@ -32,13 +36,11 @@ import org.oasis_open.docs.wsn.b_2.Unsub
 import org.oasis_open.docs.wsn.brw_2.PublisherRegistrationFailedFault;
 import org.oasis_open.docs.wsn.bw_2.NotificationProducer;
 import org.oasis_open.docs.wsn.bw_2.SubscriptionManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 @WebService(endpointInterface = "org.oasis_open.docs.wsn.brw_2.PublisherRegistrationManager")
 public class JaxwsPublisher extends JmsPublisher {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(JaxwsPublisher.class);
+    private static final Logger LOGGER = LogUtils.getL7dLogger(JaxwsPublisher.class);
 
     protected JaxwsNotificationBroker notificationBroker;
     private NotificationProducer notificationProducer;
@@ -68,7 +70,7 @@ public class JaxwsPublisher extends JmsP
             SubscribeResponse response = notificationProducer.subscribe(subscribeRequest);
             return WSNHelper.getPort(response.getSubscriptionReference(), SubscriptionManager.class);
         } catch (Exception e) {
-            LOGGER.info("Error while subscribing on-demand publisher", e);
+            LOGGER.log(Level.INFO, "Error while subscribing on-demand publisher", e);
             return null;
         }
     }
@@ -78,7 +80,7 @@ public class JaxwsPublisher extends JmsP
         try {
             ((SubscriptionManager) sub).unsubscribe(new Unsubscribe());
         } catch (Exception e) {
-            LOGGER.info("Error while unsubscribing on-demand publisher", e);
+            LOGGER.log(Level.INFO, "Error while unsubscribing on-demand publisher", e);
         }
     }
 

Modified: cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsPublisher.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsPublisher.java?rev=1181904&r1=1181903&r2=1181904&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsPublisher.java
(original)
+++ cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsPublisher.java
Tue Oct 11 17:23:36 2011
@@ -23,6 +23,9 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.JMSException;
@@ -36,6 +39,7 @@ import javax.xml.bind.JAXBException;
 import org.apache.activemq.advisory.ConsumerEvent;
 import org.apache.activemq.advisory.ConsumerEventSource;
 import org.apache.activemq.advisory.ConsumerListener;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.wsn.AbstractPublisher;
 import org.oasis_open.docs.wsn.b_2.InvalidTopicExpressionFaultType;
 import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType;
@@ -50,12 +54,10 @@ import org.oasis_open.docs.wsn.brw_2.Res
 import org.oasis_open.docs.wsn.bw_2.InvalidTopicExpressionFault;
 import org.oasis_open.docs.wsn.bw_2.TopicNotSupportedFault;
 import org.oasis_open.docs.wsrf.rw_2.ResourceUnknownFault;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public abstract class JmsPublisher extends AbstractPublisher implements ConsumerListener
{
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(JmsPublisher.class);
+    private static final Logger LOGGER = LogUtils.getL7dLogger(JmsPublisher.class);
 
     private Connection connection;
 
@@ -99,17 +101,17 @@ public abstract class JmsPublisher exten
             Message message = session.createTextMessage(writer.toString());
             producer.send(message);
         } catch (JMSException e) {
-            LOGGER.warn("Error dispatching message", e);
+            LOGGER.log(Level.WARNING, "Error dispatching message", e);
         } catch (JAXBException e) {
-            LOGGER.warn("Error dispatching message", e);
+            LOGGER.log(Level.WARNING, "Error dispatching message", e);
         } catch (InvalidTopicException e) {
-            LOGGER.warn("Error dispatching message", e);
+            LOGGER.log(Level.WARNING, "Error dispatching message", e);
         } finally {
             if (session != null) {
                 try {
                     session.close();
                 } catch (JMSException e) {
-                    LOGGER.debug("Error closing session", e);
+                    LOGGER.log(Level.FINE, "Error closing session", e);
                 }
             }
         }

Modified: cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsPullPoint.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsPullPoint.java?rev=1181904&r1=1181903&r2=1181904&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsPullPoint.java
(original)
+++ cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsPullPoint.java
Tue Oct 11 17:23:36 2011
@@ -22,6 +22,8 @@ import java.io.StringReader;
 import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.jms.Connection;
 import javax.jms.JMSException;
@@ -34,18 +36,17 @@ import javax.jms.TextMessage;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.wsn.AbstractPullPoint;
 import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType;
 import org.oasis_open.docs.wsn.b_2.Notify;
 import org.oasis_open.docs.wsn.b_2.UnableToGetMessagesFaultType;
 import org.oasis_open.docs.wsn.bw_2.UnableToGetMessagesFault;
 import org.oasis_open.docs.wsrf.rw_2.ResourceUnknownFault;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class JmsPullPoint extends AbstractPullPoint {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(JmsPullPoint.class);
+    private static final Logger LOGGER = LogUtils.getL7dLogger(JmsPullPoint.class);
 
     private JAXBContext jaxbContext;
 
@@ -88,18 +89,18 @@ public class JmsPullPoint extends Abstra
             Message message = session.createTextMessage(writer.toString());
             producer.send(message);
         } catch (JMSException e) {
-            LOGGER.warn("Error storing message", e);
+            LOGGER.log(Level.WARNING, "Error storing message", e);
             if (session != null) {
                 try {
                     session.close();
                 } catch (JMSException inner) {
-                    LOGGER.debug("Error closing session", inner);
+                    LOGGER.log(Level.FINE, "Error closing session", inner);
                 } finally {
                     session = null;
                 }
             }
         } catch (JAXBException e) {
-            LOGGER.warn("Error storing message", e);
+            LOGGER.log(Level.WARNING, "Error storing message", e);
         }
     }
 
@@ -124,12 +125,12 @@ public class JmsPullPoint extends Abstra
             }
             return messages;
         } catch (JMSException e) {
-            LOGGER.info("Error retrieving messages", e);
+            LOGGER.log(Level.INFO, "Error retrieving messages", e);
             if (session != null) {
                 try {
                     session.close();
                 } catch (JMSException inner) {
-                    LOGGER.debug("Error closing session", inner);
+                    LOGGER.log(Level.FINE, "Error closing session", inner);
                 } finally {
                     session = null;
                 }
@@ -137,7 +138,7 @@ public class JmsPullPoint extends Abstra
             UnableToGetMessagesFaultType fault = new UnableToGetMessagesFaultType();
             throw new UnableToGetMessagesFault("Unable to retrieve messages", fault, e);
         } catch (JAXBException e) {
-            LOGGER.info("Error retrieving messages", e);
+            LOGGER.log(Level.INFO, "Error retrieving messages", e);
             UnableToGetMessagesFaultType fault = new UnableToGetMessagesFaultType();
             throw new UnableToGetMessagesFault("Unable to retrieve messages", fault, e);
         }

Modified: cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsSubscription.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsSubscription.java?rev=1181904&r1=1181903&r2=1181904&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsSubscription.java
(original)
+++ cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsSubscription.java
Tue Oct 11 17:23:36 2011
@@ -20,6 +20,9 @@ package org.apache.cxf.wsn.jms;
 
 import java.io.StringReader;
 import java.util.Iterator;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 import javax.jms.Connection;
 import javax.jms.JMSException;
 import javax.jms.Message;
@@ -41,6 +44,7 @@ import javax.xml.xpath.XPathFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.wsn.AbstractSubscription;
 import org.oasis_open.docs.wsn.b_2.InvalidTopicExpressionFaultType;
 import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType;
@@ -65,12 +69,10 @@ import org.oasis_open.docs.wsn.bw_2.Unac
 import org.oasis_open.docs.wsn.bw_2.UnacceptableTerminationTimeFault;
 import org.oasis_open.docs.wsn.bw_2.UnrecognizedPolicyRequestFault;
 import org.oasis_open.docs.wsn.bw_2.UnsupportedPolicyRequestFault;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public abstract class JmsSubscription extends AbstractSubscription implements MessageListener
{
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(JmsSubscription.class);
+    private static final Logger LOGGER = LogUtils.getL7dLogger(JmsSubscription.class);
 
     private Connection connection;
 
@@ -211,7 +213,7 @@ public abstract class JmsSubscription ex
                 doNotify(notify);
             }
         } catch (Exception e) {
-            LOGGER.warn("Error notifying consumer", e);
+            LOGGER.log(Level.WARNING, "Error notifying consumer", e);
         }
     }
 
@@ -227,7 +229,7 @@ public abstract class JmsSubscription ex
                 Boolean ret = (Boolean) exp.evaluate(content, XPathConstants.BOOLEAN);
                 return ret.booleanValue();
             } catch (XPathExpressionException e) {
-                LOGGER.warn("Could not filter notification", e);
+                LOGGER.log(Level.WARNING, "Could not filter notification", e);
             }
             return false;
         }

Modified: cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/util/DOMUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/util/DOMUtil.java?rev=1181904&r1=1181903&r2=1181904&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/util/DOMUtil.java (original)
+++ cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/util/DOMUtil.java Tue
Oct 11 17:23:36 2011
@@ -21,6 +21,8 @@ package org.apache.cxf.wsn.util;
 import java.io.StringWriter;
 import java.util.Queue;
 import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilder;
@@ -40,9 +42,8 @@ import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+import org.apache.cxf.common.logging.LogUtils;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * <p>
@@ -53,7 +54,7 @@ import org.slf4j.LoggerFactory;
  */
 public final class DOMUtil {
 
-    private static final Logger LOG = LoggerFactory.getLogger(DOMUtil.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(DOMUtil.class);
 
     private static DocumentBuilderFactory dbf;
     private static Queue<DocumentBuilder> builders = new ConcurrentLinkedQueue<DocumentBuilder>();
@@ -206,8 +207,8 @@ public final class DOMUtil {
         try {
             answer = element.getAttribute(attributeName);
         } catch (Exception e) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Caught exception looking up attribute: " + attributeName 
+            if (LOG.isLoggable(Level.FINEST)) {
+                LOG.log(Level.FINEST, "Caught exception looking up attribute: " + attributeName

                              + " on element: " + element + ". Cause: " + e, e);
             }
         }

Modified: cxf/trunk/services/wsn/wsn-core/src/test/resources/logging.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-core/src/test/resources/logging.properties?rev=1181904&r1=1181903&r2=1181904&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-core/src/test/resources/logging.properties (original)
+++ cxf/trunk/services/wsn/wsn-core/src/test/resources/logging.properties Tue Oct 11 17:23:36
2011
@@ -7,7 +7,7 @@ handlers = java.util.logging.ConsoleHand
 .level = ALL
 
 # Set the default logging level for new ConsoleHandler instances
-java.util.logging.ConsoleHandler.level = INFO
+java.util.logging.ConsoleHandler.level = WARNING
 
 # Set the default logging level for new FileHandler instances
 java.util.logging.FileHandler.level = ALL



Mime
View raw message