You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2009/03/27 14:02:36 UTC

svn commit: r759125 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java

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());
             }
         }