make single ack id visible

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@759125 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2009-03-27 13:02:36 +00:00
parent 24dced675c
commit b896467146
1 changed files with 6 additions and 4 deletions

View File

@ -150,10 +150,12 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport implements
public void acknowledge(ConsumerBrokerExchange consumerExchange, public void acknowledge(ConsumerBrokerExchange consumerExchange,
MessageAck ack) throws Exception { MessageAck ack) throws Exception {
if (isLogAll() || isLogConsumerEvents()) { if (isLogAll() || isLogConsumerEvents()) {
LOG.info("Achknowledging message for client ID : " LOG.info("Acknowledging message for client ID : "
+ consumerExchange.getConnectionContext().getClientId()); + consumerExchange.getConnectionContext().getClientId()
if (LOG.isTraceEnabled()) { + (ack.getMessageCount() == 1 ? ", " + ack.getLastMessageId() : ""));
LOG.trace("First Message Id: " + ack.getFirstMessageId() if (LOG.isTraceEnabled() && ack.getMessageCount() > 1) {
LOG.trace("Message count: " + ack.getMessageCount()
+ ", First Message Id: " + ack.getFirstMessageId()
+ ", Last Message Id: " + ack.getLastMessageId()); + ", Last Message Id: " + ack.getLastMessageId());
} }
} }