qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaudsi...@apache.org
Subject svn commit: r602084 - in /incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example: ./ publisher/ shared/ subscriber/
Date Fri, 07 Dec 2007 12:42:27 GMT
Author: arnaudsimon
Date: Fri Dec  7 04:42:26 2007
New Revision: 602084

URL: http://svn.apache.org/viewvc?rev=602084&view=rev
Log:
Removed log4j deps

Modified:
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/log4j.xml
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/FileMessageDispatcher.java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorMessageDispatcher.java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorPublisher.java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/Publisher.java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriber.java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriptionWrapper.java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/Subscriber.java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/SubscriptionWrapper.java

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/log4j.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/log4j.xml?rev=602084&r1=602083&r2=602084&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/log4j.xml
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/log4j.xml
Fri Dec  7 04:42:26 2007
@@ -38,7 +38,7 @@
     </appender>
 
     <root>
-        <priority value="debug"/>
+        <priority value="info"/>
         <appender-ref ref="STDOUT"/>
         <appender-ref ref="FileAppender"/>
     </root>

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/FileMessageDispatcher.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/FileMessageDispatcher.java?rev=602084&r1=602083&r2=602084&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/FileMessageDispatcher.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/FileMessageDispatcher.java
Fri Dec  7 04:42:26 2007
@@ -24,10 +24,11 @@
 
 import javax.jms.JMSException;
 
-import org.apache.log4j.Logger;
 
 import org.apache.qpid.example.shared.FileUtils;
 import org.apache.qpid.example.shared.Statics;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * Class that sends message files to the Publisher to distribute
@@ -37,7 +38,7 @@
 public class FileMessageDispatcher
 {
 
-    protected static final Logger _logger = Logger.getLogger(FileMessageDispatcher.class);
+    protected static final Logger _logger = LoggerFactory.getLogger(FileMessageDispatcher.class);
 
     protected static Publisher _publisher = null;
 

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorMessageDispatcher.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorMessageDispatcher.java?rev=602084&r1=602083&r2=602084&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorMessageDispatcher.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorMessageDispatcher.java
Fri Dec  7 04:42:26 2007
@@ -18,8 +18,9 @@
  */
 package org.apache.qpid.example.publisher;
 
-import org.apache.log4j.BasicConfigurator;
-import org.apache.log4j.Logger;
+
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 import javax.jms.DeliveryMode;
 import javax.jms.JMSException;
@@ -31,7 +32,7 @@
 public class MonitorMessageDispatcher
 {
 
-    private static final Logger _logger = Logger.getLogger(MonitorMessageDispatcher.class);
+    private static final Logger _logger = LoggerFactory.getLogger(MonitorMessageDispatcher.class);
 
     protected static MonitorPublisher _monitorPublisher = null;
 
@@ -46,8 +47,6 @@
     public static void main(String[] args)
     {
         //Switch on logging appropriately for your app
-        BasicConfigurator.configure();
-
         try
         {
             int i =0;

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorPublisher.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorPublisher.java?rev=602084&r1=602083&r2=602084&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorPublisher.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorPublisher.java
Fri Dec  7 04:42:26 2007
@@ -18,8 +18,9 @@
  */
 package org.apache.qpid.example.publisher;
 
-import org.apache.log4j.Logger;
 import org.apache.qpid.client.BasicMessageProducer;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 import javax.jms.DeliveryMode;
 import javax.jms.JMSException;
@@ -33,7 +34,7 @@
 public class MonitorPublisher extends Publisher
 {
 
-    private static final Logger _log = Logger.getLogger(Publisher.class);
+    private static final Logger _log = LoggerFactory.getLogger(Publisher.class);
 
     BasicMessageProducer _producer;
 
@@ -64,7 +65,7 @@
         catch (JMSException e)
         {
             //Have to assume our commit failed but do not rollback here as channel closed
-            _log.error(e);
+            _log.error("JMSException", e);
             e.printStackTrace();
             throw new UndeliveredMessageException("Cannot deliver immediate message", e);
         }
@@ -93,7 +94,7 @@
         catch (JMSException e)
         {
             //Have to assume our commit failed but do not rollback here as channel closed
-            _log.error(e);
+            _log.error("JMSException", e);
             e.printStackTrace();
             throw new UndeliveredMessageException("Cannot deliver immediate message", e);
         }

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/Publisher.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/Publisher.java?rev=602084&r1=602083&r2=602084&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/Publisher.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/Publisher.java
Fri Dec  7 04:42:26 2007
@@ -18,8 +18,6 @@
  */
 package org.apache.qpid.example.publisher;
 
-import org.apache.log4j.Logger;
-
 import org.apache.qpid.client.AMQConnectionFactory;
 
 import javax.jms.JMSException;
@@ -33,10 +31,12 @@
 import javax.naming.InitialContext;
 
 import org.apache.qpid.example.shared.InitialContextHelper;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 public class Publisher
 {
-    private static final Logger _log = Logger.getLogger(Publisher.class);
+    private static final Logger _log = LoggerFactory.getLogger(Publisher.class);
 
     protected InitialContextHelper _contextHelper;
 
@@ -88,7 +88,7 @@
         catch (Exception e)
         {
             e.printStackTrace();
-            _log.error(e);
+            _log.error("Exception", e);
         }
     }
 
@@ -113,7 +113,7 @@
             try
             {
                 _session.rollback();
-                _log.error(e);
+                _log.error("JMSException", e);
                 e.printStackTrace();
                 return false;
             }

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java?rev=602084&r1=602083&r2=602084&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java
Fri Dec  7 04:42:26 2007
@@ -27,7 +27,8 @@
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * Class that provides helper methods for JNDI
@@ -38,7 +39,7 @@
     public static final String _defaultPropertiesName = "example.properties";
     protected static Properties _fileProperties;
     protected static InitialContext _initialContext;
-    protected static final Logger _log = Logger.getLogger(InitialContextHelper.class);
+    protected static final Logger _log = LoggerFactory.getLogger(InitialContextHelper.class);
 
     public InitialContextHelper(String propertiesName) throws ContextException
     {

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriber.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriber.java?rev=602084&r1=602083&r2=602084&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriber.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriber.java
Fri Dec  7 04:42:26 2007
@@ -18,11 +18,11 @@
  */
 package org.apache.qpid.example.subscriber;
 
-import org.apache.log4j.Logger;
 import org.apache.qpid.example.shared.Statics;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 import javax.jms.*;
-
 /**
  * Subclass of Subscriber which consumes a heartbeat message
  */
@@ -31,7 +31,7 @@
 {
     protected String _monitorDestinationName;
 
-    private static final Logger _logger = Logger.getLogger(MonitoredSubscriber.class);
+    private static final Logger _logger = LoggerFactory.getLogger(MonitoredSubscriber.class);
 
     private static MessageConsumer _monitorConsumer;
 

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriptionWrapper.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriptionWrapper.java?rev=602084&r1=602083&r2=602084&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriptionWrapper.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriptionWrapper.java
Fri Dec  7 04:42:26 2007
@@ -18,7 +18,6 @@
  */
 package org.apache.qpid.example.subscriber;
 
-import org.apache.log4j.BasicConfigurator;
 
 /**
  * Allows you to simply start a monitored subscriber
@@ -32,10 +31,7 @@
      * @param args - no params required
      */
     public static void main(String args[])
-    {
-        //switch on logging
-        BasicConfigurator.configure();
-
+    {      
         _subscriber = new MonitoredSubscriber();
 
         _subscriber.subscribe();

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/Subscriber.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/Subscriber.java?rev=602084&r1=602083&r2=602084&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/Subscriber.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/Subscriber.java
Fri Dec  7 04:42:26 2007
@@ -18,7 +18,6 @@
  */
 package org.apache.qpid.example.subscriber;
 
-import org.apache.log4j.Logger;
 import org.apache.qpid.client.AMQConnectionFactory;
 
 import javax.jms.*;
@@ -28,6 +27,8 @@
 import javax.naming.InitialContext;
 
 import org.apache.qpid.example.shared.InitialContextHelper;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * Subscriber which consumes messages from a queue
@@ -35,7 +36,7 @@
 
 public class Subscriber
 {
-    private static final Logger _log = Logger.getLogger(Subscriber.class);
+    private static final Logger _log = LoggerFactory.getLogger(Subscriber.class);
 
     protected static Connection _connection;
 

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/SubscriptionWrapper.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/SubscriptionWrapper.java?rev=602084&r1=602083&r2=602084&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/SubscriptionWrapper.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/subscriber/SubscriptionWrapper.java
Fri Dec  7 04:42:26 2007
@@ -18,8 +18,6 @@
  */
 package org.apache.qpid.example.subscriber;
 
-import org.apache.log4j.BasicConfigurator;
-
 /**
  * Allows you to simply start a subscriber
  */
@@ -33,9 +31,6 @@
      */
     public static void main(String args[])
     {
-        //switch on logging
-        BasicConfigurator.configure();
-        
          _subscriber = new Subscriber();
 
         _subscriber.subscribe();



Mime
View raw message