activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r759125 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
Date Fri, 27 Mar 2009 13:02:36 GMT
Author: gtully
Date: Fri Mar 27 13:02:36 2009
New Revision: 759125

URL: http://svn.apache.org/viewvc?rev=759125&view=rev
Log:
make single ack id visible

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java?rev=759125&r1=759124&r2=759125&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
Fri Mar 27 13:02:36 2009
@@ -150,10 +150,12 @@
     public void acknowledge(ConsumerBrokerExchange consumerExchange,
             MessageAck ack) throws Exception {
         if (isLogAll() || isLogConsumerEvents()) {
-            LOG.info("Achknowledging message for client ID : "
-                    + consumerExchange.getConnectionContext().getClientId());
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("First Message Id: " + ack.getFirstMessageId()
+            LOG.info("Acknowledging message for client ID : "
+                    + consumerExchange.getConnectionContext().getClientId() 
+                    + (ack.getMessageCount() == 1 ? ", " + ack.getLastMessageId() : ""));
+            if (LOG.isTraceEnabled() && ack.getMessageCount() > 1) {
+                LOG.trace("Message count: " + ack.getMessageCount()
+                        + ", First Message Id: " + ack.getFirstMessageId()
                         + ", Last Message Id: " + ack.getLastMessageId());
             }
         }



Mime
View raw message