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