activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [3/5] https://issues.apache.org/jira/browse/AMQ-4721
Date Fri, 13 Sep 2013 18:53:55 GMT
http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java
index fd65faa..aec5c06 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java
@@ -69,9 +69,7 @@ class TopicStorePrefetch extends AbstractStoreCursor {
         
     @Override
     public synchronized boolean recoverMessage(Message message, boolean cached) throws Exception {
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("recover: " + message.getMessageId() + ", priority: " + message.getPriority());
-        }
+        LOG.trace("recover: {}, priority: {}", message.getMessageId(), message.getPriority());
         boolean recovered = false;
         MessageEvaluationContext messageEvaluationContext = new NonCachedMessageEvaluationContext();
         messageEvaluationContext.setMessageReference(message);
@@ -89,7 +87,7 @@ class TopicStorePrefetch extends AbstractStoreCursor {
         try {
             return store.getMessageCount(clientId, subscriberName);
         } catch (Exception e) {
-            LOG.error(this + " Failed to get the outstanding message count from the store", e);
+            LOG.error("{} Failed to get the outstanding message count from the store", this, e);
             throw new RuntimeException(e);
         }
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowAckConsumerStrategy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowAckConsumerStrategy.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowAckConsumerStrategy.java
index c026bb1..9de3ea9 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowAckConsumerStrategy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowAckConsumerStrategy.java
@@ -124,9 +124,7 @@ public class AbortSlowAckConsumerStrategy extends AbortSlowConsumerStrategy {
 
             if (timeDelta > maxTimeSinceLastAck) {
                 if (!slowConsumers.containsKey(subscriber)) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("sub: {} is now slow", subscriber.getConsumerInfo().getConsumerId());
-                    }
+                    LOG.debug("sub: {} is now slow", subscriber.getConsumerInfo().getConsumerId());
                     slowConsumers.put(subscriber, new SlowConsumerEntry(subscriber.getContext()));
                 } else if (getMaxSlowCount() > 0) {
                     slowConsumers.get(subscriber).slow();
@@ -145,22 +143,14 @@ public class AbortSlowAckConsumerStrategy extends AbortSlowConsumerStrategy {
             if (getMaxSlowDuration() > 0 && (entry.getValue().markCount * getCheckPeriod() > getMaxSlowDuration()) ||
                 getMaxSlowCount() > 0 && entry.getValue().slowCount > getMaxSlowCount()) {
 
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Transferring consumer {} to the abort list: " +
-                              "slow duration = " + entry.getValue().markCount * getCheckPeriod() + ", " +
-                              "slow count = " + entry.getValue().slowCount,
-                              entry.getKey().getConsumerInfo().getConsumerId());
-                }
+                LOG.trace("Transferring consumer{} to the abort list: {} slow duration = {}, slow count = {}", new Object[]{ entry.getKey().getConsumerInfo().getConsumerId(), entry.getValue().markCount * getCheckPeriod(), entry.getValue().getSlowCount() });
 
                 toAbort.put(entry.getKey(), entry.getValue());
                 slowConsumers.remove(entry.getKey());
             } else {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Not yet time to abot consumer {}: " +
-                              "slow duration = " + entry.getValue().markCount * getCheckPeriod() + ", " +
-                              "slow count = " + entry.getValue().slowCount,
-                              entry.getKey().getConsumerInfo().getConsumerId());
-                }
+
+                LOG.trace("Not yet time to abort consumer {}: slow duration = {}, slow count = {}", new Object[]{ entry.getKey().getConsumerInfo().getConsumerId(), entry.getValue().markCount * getCheckPeriod(), entry.getValue().slowCount });
+
             }
         }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java
index d35f610..f029920 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java
@@ -47,9 +47,7 @@ public abstract class AbstractDeadLetterStrategy implements DeadLetterStrategy {
             result = true;
             if (enableAudit && messageAudit.isDuplicate(message)) {
                 result = false;
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Not adding duplicate to DLQ: " + message.getMessageId() + ", dest: " + message.getDestination());
-                }
+                LOG.debug("Not adding duplicate to DLQ: {}, dest: {}", message.getMessageId(), message.getDestination());
             }
             if (!message.isPersistent() && !processNonPersistent) {
                 result = false;

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/DiscardingDeadLetterStrategy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/DiscardingDeadLetterStrategy.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/DiscardingDeadLetterStrategy.java
index 4371501..85128b8 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/DiscardingDeadLetterStrategy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/DiscardingDeadLetterStrategy.java
@@ -18,9 +18,7 @@ public class DiscardingDeadLetterStrategy extends SharedDeadLetterStrategy {
     @Override
     public boolean isSendToDeadLetterQueue(Message message) {
         boolean result = false;
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Discarding message sent to DLQ: " + message.getMessageId() + ", dest: " + message.getDestination());
-        }
+        LOG.debug("Discarding message sent to DLQ: {}, dest: {}", message.getMessageId(), message.getDestination());
         return result;
     }
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java
index 9302804..e6ae512 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java
@@ -225,9 +225,7 @@ public class PolicyEntry extends DestinationMapEntry {
                 }
             }
             if (value >= 0) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Setting the maximumPendingMessages size to: " + value + " for consumer: " + subscription.getInfo().getConsumerId());
-                }
+                LOG.debug("Setting the maximumPendingMessages size to: {} for consumer: {}", value, subscription.getInfo().getConsumerId());
                 subscription.setMaximumPendingMessages(value);
             }
         }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java
index 79b6195..a71825c 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java
@@ -56,14 +56,13 @@ public class PriorityNetworkDispatchPolicy extends SimpleDispatchPolicy {
                             } else {
                                 // higher priority matching sub exists
                                 highestPrioritySub = false;
-                                if (LOG.isDebugEnabled()) {
-                                LOG.debug("ignoring lower priority: " + candidate 
-                                        + "[" +candidate.getConsumerInfo().getNetworkConsumerIds() +", "
-                                        + candidate.getConsumerInfo().getNetworkConsumerIds() +"] in favour of: " 
-                                        + sub
-                                        + "[" +sub.getConsumerInfo().getNetworkConsumerIds() +", "
-                                        + sub.getConsumerInfo().getNetworkConsumerIds() +"]");
-                                }
+                                LOG.debug("ignoring lower priority: {} [{}, {}] in favour of: {} [{}, {}]",
+                                        new Object[]{ candidate,
+                                                candidate.getConsumerInfo().getNetworkConsumerIds(),
+                                                candidate.getConsumerInfo().getNetworkConsumerIds(),
+                                                sub,
+                                                sub.getConsumerInfo().getNetworkConsumerIds(),
+                                                sub.getConsumerInfo().getNetworkConsumerIds() });
                             }
                         }
                     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java
index 3a0e27c..43c344f 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java
@@ -114,7 +114,7 @@ public class QueryBasedSubscriptionRecoveryPolicy implements SubscriptionRecover
             configure(activeMessage);
             sub.addRecoveredMessage(context, activeMessage);
         } catch (Throwable e) {
-            LOG.warn("Failed to dispatch initial message: " + message + " into subscription. Reason: " + e, e);
+            LOG.warn("Failed to dispatch initial message: {} into subscription. Reason: ", message, e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java
index efdc827..95a4534 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java
@@ -21,8 +21,6 @@ import java.util.List;
 import org.apache.activemq.broker.region.MessageReference;
 import org.apache.activemq.broker.region.Subscription;
 import org.apache.activemq.filter.MessageEvaluationContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Simple dispatch policy that sends a message to every subscription that
@@ -32,7 +30,6 @@ import org.slf4j.LoggerFactory;
  * 
  */
 public class RoundRobinDispatchPolicy implements DispatchPolicy {
-    static final Logger LOG = LoggerFactory.getLogger(RoundRobinDispatchPolicy.class);
 
     /**
      * @param node

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java
index 08e0adc..d571952 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java
@@ -39,8 +39,7 @@ public interface SubscriptionRecoveryPolicy extends Service {
      * A message was sent to the destination.
      * 
      * @param context
-     * @param message 
-     * @param node
+     * @param message
      * @return true if successful
      * @throws Exception
      */
@@ -51,8 +50,7 @@ public interface SubscriptionRecoveryPolicy extends Service {
      * 
      * @param context
      * @param topic
-     * @param sub 
-     * @param node
+     * @param sub
      * @throws Exception
      */
     void recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub) throws Exception;

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/UniquePropertyMessageEvictionStrategy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/UniquePropertyMessageEvictionStrategy.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/UniquePropertyMessageEvictionStrategy.java
index cb044e5..39d54d3 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/UniquePropertyMessageEvictionStrategy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/UniquePropertyMessageEvictionStrategy.java
@@ -17,8 +17,6 @@
 package org.apache.activemq.broker.region.policy;
 
 import org.apache.activemq.broker.region.MessageReference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
 import java.util.HashMap;
@@ -35,8 +33,6 @@ import java.util.LinkedList;
  */
 public class UniquePropertyMessageEvictionStrategy extends MessageEvictionStrategySupport {
 
-    private static final Logger LOG = LoggerFactory.getLogger(UniquePropertyMessageEvictionStrategy.class);
-
     protected String propertyName;
 
     public String getPropertyName() {

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/VMPendingDurableSubscriberMessageStoragePolicy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/VMPendingDurableSubscriberMessageStoragePolicy.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/VMPendingDurableSubscriberMessageStoragePolicy.java
index cee1f3c..327257a 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/VMPendingDurableSubscriberMessageStoragePolicy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/VMPendingDurableSubscriberMessageStoragePolicy.java
@@ -18,7 +18,6 @@ package org.apache.activemq.broker.region.policy;
 
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.region.DurableTopicSubscription;
-import org.apache.activemq.broker.region.Subscription;
 import org.apache.activemq.broker.region.cursors.AbstractPendingMessageCursor;
 import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
 import org.apache.activemq.broker.region.cursors.VMPendingMessageCursor;

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java
index fca1949..e5ee5eb 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java
@@ -62,7 +62,7 @@ public class MirroredQueue implements DestinationInterceptor, BrokerServiceAware
                     }
                 }
                 catch (Exception e) {
-                    LOG.error("Failed to lookup the mirror destination for: " + destination + ". Reason: " + e, e);
+                    LOG.error("Failed to lookup the mirror destination for: {}", destination, e);
                 }
             }
         }
@@ -79,7 +79,7 @@ public class MirroredQueue implements DestinationInterceptor, BrokerServiceAware
             try {
                 brokerService.removeDestination(topic);
             } catch (Exception e) {
-                LOG.error("Failed to remove mirror destination for " + destination + ". Reason: " + e,e);
+                LOG.error("Failed to remove mirror destination for {}", destination, e);
             }
         }
         

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestination.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestination.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestination.java
index 21a383d..57d742c 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestination.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestination.java
@@ -16,7 +16,6 @@
  */
 package org.apache.activemq.broker.region.virtual;
 
-import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.broker.region.DestinationInterceptor;
 import org.apache.activemq.command.ActiveMQDestination;

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/JobSupport.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/JobSupport.java b/activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/JobSupport.java
index b1cc7cf..6b78d77 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/JobSupport.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/JobSupport.java
@@ -20,9 +20,6 @@ import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-/**
- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- */
 public class JobSupport {
     public static String getDateTime(long value) {
         DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java b/activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java
index d4efa94..6cd476f 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java
@@ -271,9 +271,7 @@ public class SchedulerBroker extends BrokerFilter implements JobListener {
                         messageSend.setExpiration(expiration);
                     }
                     messageSend.setTimestamp(newTimeStamp);
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Set message " + messageSend.getMessageId() + " timestamp from " + oldTimestamp + " to " + newTimeStamp);
-                    }
+                    LOG.debug("Set message {} timestamp from {} to {}", new Object[]{ messageSend.getMessageId(), oldTimestamp, newTimeStamp });
                 }
             }
 
@@ -283,7 +281,7 @@ public class SchedulerBroker extends BrokerFilter implements JobListener {
             producerExchange.setProducerState(new ProducerState(new ProducerInfo()));
             super.send(producerExchange, messageSend);
         } catch (Exception e) {
-            LOG.error("Failed to send scheduled message " + id, e);
+            LOG.error("Failed to send scheduled message {}", id, e);
         }
     }
 
@@ -327,7 +325,7 @@ public class SchedulerBroker extends BrokerFilter implements JobListener {
                 context.setProducerFlowControl(originalFlowControl);
             }
         } catch (Exception e) {
-            LOG.error("Failed to send scheduled message " + job.getJobId(), e);
+            LOG.error("Failed to send scheduled message {}", job.getJobId(), e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java b/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
index ea527c1..f21589a 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
@@ -71,7 +71,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
      * @org.apache.xbean.InitMethod
      */
     public void afterPropertiesSet() throws Exception {
-        LOG.info("Created LoggingBrokerPlugin: " + this.toString());
+        LOG.info("Created LoggingBrokerPlugin: {}", this.toString());
     }
 
     public boolean isLogAll() {
@@ -165,11 +165,9 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
         if (isLogAll() || isLogConsumerEvents()) {
-            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());
+            LOG.info("Acknowledging message for client ID: {}{}", consumerExchange.getConnectionContext().getClientId(), (ack.getMessageCount() == 1 ? ", " + ack.getLastMessageId() : ""));
+            if (ack.getMessageCount() > 1) {
+                LOG.trace("Message count: {}, First Message Id: {}, Last Message Id: {}", new Object[]{ ack.getMessageCount(), ack.getFirstMessageId(), ack.getLastMessageId() });
             }
         }
         super.acknowledge(consumerExchange, ack);
@@ -178,7 +176,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public Response messagePull(ConnectionContext context, MessagePull pull) throws Exception {
         if (isLogAll() || isLogConsumerEvents()) {
-            LOG.info("Message Pull from : " + context.getClientId() + " on " + pull.getDestination().getPhysicalName());
+            LOG.info("Message Pull from: {} on {}", context.getClientId(), pull.getDestination().getPhysicalName());
         }
         return super.messagePull(context, pull);
     }
@@ -186,7 +184,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
         if (isLogAll() || isLogConnectionEvents()) {
-            LOG.info("Adding Connection : " + info);
+            LOG.info("Adding Connection: {}", info);
         }
         super.addConnection(context, info);
     }
@@ -194,7 +192,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
         if (isLogAll() || isLogConsumerEvents()) {
-            LOG.info("Adding Consumer : " + info);
+            LOG.info("Adding Consumer: {}", info);
         }
         return super.addConsumer(context, info);
     }
@@ -202,7 +200,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
         if (isLogAll() || isLogProducerEvents()) {
-            LOG.info("Adding Producer :" + info);
+            LOG.info("Adding Producer: {}", info);
         }
         super.addProducer(context, info);
     }
@@ -210,7 +208,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
         if (isLogAll() || isLogTransactionEvents()) {
-            LOG.info("Commiting transaction : " + xid.getTransactionKey());
+            LOG.info("Committing transaction: {}", xid.getTransactionKey());
         }
         super.commitTransaction(context, xid, onePhase);
     }
@@ -218,7 +216,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
         if (isLogAll() || isLogConsumerEvents()) {
-            LOG.info("Removing subscription : " + info);
+            LOG.info("Removing subscription: {}", info);
         }
         super.removeSubscription(context, info);
     }
@@ -235,7 +233,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
                 }
                 tids.append(tid.getTransactionKey());
             }
-            LOG.info("Prepared transactions : " + tids);
+            LOG.info("Prepared transactions: {}", tids);
         }
         return result;
     }
@@ -243,7 +241,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception {
         if (isLogAll() || isLogTransactionEvents()) {
-            LOG.info("Preparing transaction : " + xid.getTransactionKey());
+            LOG.info("Preparing transaction: {}", xid.getTransactionKey());
         }
         return super.prepareTransaction(context, xid);
     }
@@ -251,7 +249,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
         if (isLogAll() || isLogConnectionEvents()) {
-            LOG.info("Removing Connection : " + info);
+            LOG.info("Removing Connection: {}", info);
         }
         super.removeConnection(context, info, error);
     }
@@ -259,7 +257,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
         if (isLogAll() || isLogConsumerEvents()) {
-            LOG.info("Removing Consumer : " + info);
+            LOG.info("Removing Consumer: {}", info);
         }
         super.removeConsumer(context, info);
     }
@@ -267,7 +265,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
         if (isLogAll() || isLogProducerEvents()) {
-            LOG.info("Removing Producer : " + info);
+            LOG.info("Removing Producer: {}", info);
         }
         super.removeProducer(context, info);
     }
@@ -275,7 +273,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
         if (isLogAll() || isLogTransactionEvents()) {
-            LOG.info("Rolling back Transaction : " + xid.getTransactionKey());
+            LOG.info("Rolling back Transaction: {}", xid.getTransactionKey());
         }
         super.rollbackTransaction(context, xid);
     }
@@ -295,13 +293,13 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
             perDestinationsLogger = LoggerFactory.getLogger(LOG.getName() +
                     "." + destination.getDestinationTypeAsString() + "." + destination.getPhysicalName());
         }
-        perDestinationsLogger.info("Sending message : " + copy);
+        perDestinationsLogger.info("Sending message: {}", copy);
     }
 
     @Override
     public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception {
         if (isLogAll() || isLogTransactionEvents()) {
-            LOG.info("Beginning transaction : " + xid.getTransactionKey());
+            LOG.info("Beginning transaction: {}", xid.getTransactionKey());
         }
         super.beginTransaction(context, xid);
     }
@@ -309,7 +307,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception {
         if (isLogAll() || isLogTransactionEvents()) {
-            LOG.info("Forgetting transaction : " + transactionId.getTransactionKey());
+            LOG.info("Forgetting transaction: {}", transactionId.getTransactionKey());
         }
         super.forgetTransaction(context, transactionId);
     }
@@ -327,7 +325,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
                     cids.append(cids.length() > 0 ? ", " : "");
                     cids.append(c.getConnectionId());
                 }
-                LOG.info("Connected clients : " + cids);
+                LOG.info("Connected clients: {}", cids);
             }
         }
         return super.getClients();
@@ -337,8 +335,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     public org.apache.activemq.broker.region.Destination addDestination(ConnectionContext context,
             ActiveMQDestination destination, boolean create) throws Exception {
         if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Adding destination : " + destination.getDestinationTypeAsString() + ":"
-                    + destination.getPhysicalName());
+            LOG.info("Adding destination: {}:{}", destination.getDestinationTypeAsString(), destination.getPhysicalName());
         }
         return super.addDestination(context, destination, create);
     }
@@ -347,8 +344,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout)
             throws Exception {
         if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Removing destination : " + destination.getDestinationTypeAsString() + ":"
-                    + destination.getPhysicalName());
+            LOG.info("Removing destination: {}:{}", destination.getDestinationTypeAsString(), destination.getPhysicalName());
         }
         super.removeDestination(context, destination, timeout);
     }
@@ -365,7 +361,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
                     destinations.append(destinations.length() > 0 ? ", " : "");
                     destinations.append(dest.getPhysicalName());
                 }
-                LOG.info("Get Destinations : " + destinations);
+                LOG.info("Get Destinations: {}", destinations);
             }
         }
         return result;
@@ -374,7 +370,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void start() throws Exception {
         if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Starting " + getBrokerName());
+            LOG.info("Starting {}", getBrokerName());
         }
         super.start();
     }
@@ -382,7 +378,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void stop() throws Exception {
         if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Stopping " + getBrokerName());
+            LOG.info("Stopping {}", getBrokerName());
         }
         super.stop();
     }
@@ -390,7 +386,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
         if (isLogAll() || isLogSessionEvents()) {
-            LOG.info("Adding Session : " + info);
+            LOG.info("Adding Session: {}", info);
         }
         super.addSession(context, info);
     }
@@ -398,7 +394,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
         if (isLogAll() || isLogSessionEvents()) {
-            LOG.info("Removing Session : " + info);
+            LOG.info("Removing Session: {}", info);
         }
         super.removeSession(context, info);
     }
@@ -406,7 +402,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void addBroker(Connection connection, BrokerInfo info) {
         if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Adding Broker " + info.getBrokerName());
+            LOG.info("Adding Broker {}", info.getBrokerName());
         }
         super.addBroker(connection, info);
     }
@@ -414,7 +410,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void removeBroker(Connection connection, BrokerInfo info) {
         if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Removing Broker " + info.getBrokerName());
+            LOG.info("Removing Broker {}", info.getBrokerName());
         }
         super.removeBroker(connection, info);
     }
@@ -431,7 +427,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
                     peers.append(peers.length() > 0 ? ", " : "");
                     peers.append(bi.getBrokerName());
                 }
-                LOG.info("Get Peer Broker Infos : " + peers);
+                LOG.info("Get Peer Broker Infos: {}", peers);
             }
         }
         return result;
@@ -440,7 +436,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void preProcessDispatch(MessageDispatch messageDispatch) {
         if (isLogAll() || isLogInternalEvents() || isLogConsumerEvents()) {
-            LOG.info("preProcessDispatch :" + messageDispatch);
+            LOG.info("preProcessDispatch: {}", messageDispatch);
         }
         super.preProcessDispatch(messageDispatch);
     }
@@ -448,7 +444,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void postProcessDispatch(MessageDispatch messageDispatch) {
         if (isLogAll() || isLogInternalEvents() || isLogConsumerEvents()) {
-            LOG.info("postProcessDispatch :" + messageDispatch);
+            LOG.info("postProcessDispatch: {}", messageDispatch);
         }
         super.postProcessDispatch(messageDispatch);
     }
@@ -456,7 +452,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
         if (isLogAll() || isLogInternalEvents() || isLogConsumerEvents()) {
-            LOG.info("ProcessDispatchNotification :" + messageDispatchNotification);
+            LOG.info("ProcessDispatchNotification: {}", messageDispatchNotification);
         }
         super.processDispatchNotification(messageDispatchNotification);
     }
@@ -473,7 +469,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
                     destinations.append(destinations.length() > 0 ? ", " : "");
                     destinations.append(dest.getPhysicalName());
                 }
-                LOG.info("Get Durable Destinations : " + destinations);
+                LOG.info("Get Durable Destinations: {}", destinations);
             }
         }
         return result;
@@ -482,7 +478,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
         if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Adding destination info : " + info);
+            LOG.info("Adding destination info: {}", info);
         }
         super.addDestinationInfo(context, info);
     }
@@ -490,7 +486,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
         if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Removing destination info : " + info);
+            LOG.info("Removing destination info: {}", info);
         }
         super.removeDestinationInfo(context, info);
     }
@@ -502,7 +498,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
 
             msg = message.getMessage().toString();
 
-            LOG.info("Message has expired : " + msg);
+            LOG.info("Message has expired: {}", msg);
         }
         super.messageExpired(context, message, subscription);
     }
@@ -515,7 +511,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
 
             msg = messageReference.getMessage().toString();
 
-            LOG.info("Sending to DLQ : " + msg);
+            LOG.info("Sending to DLQ: {}", msg);
         }
         return super.sendToDeadLetterQueue(context, messageReference, subscription, poisonCause);
     }
@@ -523,7 +519,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void fastProducer(ConnectionContext context, ProducerInfo producerInfo,ActiveMQDestination destination) {
         if (isLogAll() || isLogProducerEvents() || isLogInternalEvents()) {
-            LOG.info("Fast Producer : " + producerInfo);
+            LOG.info("Fast Producer: {}", producerInfo);
         }
         super.fastProducer(context, producerInfo, destination);
     }
@@ -531,7 +527,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void isFull(ConnectionContext context, Destination destination, Usage usage) {
         if (isLogAll() || isLogProducerEvents() || isLogInternalEvents()) {
-            LOG.info("Destination is full : " + destination.getName());
+            LOG.info("Destination is full: {}", destination.getName());
         }
         super.isFull(context, destination, usage);
     }
@@ -543,7 +539,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
 
             msg = messageReference.getMessage().toString();
 
-            LOG.info("Message consumed : " + msg);
+            LOG.info("Message consumed: {}", msg);
         }
         super.messageConsumed(context, messageReference);
     }
@@ -555,7 +551,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
 
             msg = messageReference.getMessage().toString();
 
-            LOG.info("Message delivered : " + msg);
+            LOG.info("Message delivered: {}", msg);
         }
         super.messageDelivered(context, messageReference);
     }
@@ -567,7 +563,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
 
             msg = messageReference.getMessage().toString();
 
-            LOG.info("Message discarded : " + msg);
+            LOG.info("Message discarded: {}", msg);
         }
         super.messageDiscarded(context, sub, messageReference);
     }
@@ -575,7 +571,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void slowConsumer(ConnectionContext context, Destination destination, Subscription subs) {
         if (isLogAll() || isLogConsumerEvents() || isLogInternalEvents()) {
-            LOG.info("Detected slow consumer on " + destination.getName());
+            LOG.info("Detected slow consumer on {}", destination.getName());
             StringBuffer buf = new StringBuffer("Connection(");
             buf.append(subs.getConsumerInfo().getConsumerId().getConnectionId());
             buf.append(") Session(");
@@ -589,7 +585,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
     @Override
     public void nowMasterBroker() {
         if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Is now the master broker : " + getBrokerName());
+            LOG.info("Is now the master broker: {}", getBrokerName());
         }
         super.nowMasterBroker();
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/util/RedeliveryPlugin.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/util/RedeliveryPlugin.java b/activemq-broker/src/main/java/org/apache/activemq/broker/util/RedeliveryPlugin.java
index 83a8e3e..0245ffb 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/util/RedeliveryPlugin.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/util/RedeliveryPlugin.java
@@ -148,12 +148,12 @@ public class RedeliveryPlugin extends BrokerPluginSupport {
                     } else if (isSendToDlqIfMaxRetriesExceeded()) {
                         return super.sendToDeadLetterQueue(context, messageReference, subscription, poisonCause);
                     } else {
-                        LOG.debug("Discarding message that exceeds max redelivery count( " + maximumRedeliveries + "), " + messageReference.getMessageId());
+                        LOG.debug("Discarding message that exceeds max redelivery count({}), {}", maximumRedeliveries, messageReference.getMessageId());
                     }
                 } else if (isFallbackToDeadLetter()) {
                     return super.sendToDeadLetterQueue(context, messageReference, subscription, poisonCause);
                 } else {
-                    LOG.debug("Ignoring dlq request for:" + messageReference.getMessageId() + ", RedeliveryPolicy not found (and no fallback) for: " + regionDestination.getActiveMQDestination());
+                    LOG.debug("Ignoring dlq request for: {}, RedeliveryPolicy not found (and no fallback) for: {}", messageReference.getMessageId(), regionDestination.getActiveMQDestination());
                 }
 
                 return false;
@@ -169,8 +169,9 @@ public class RedeliveryPlugin extends BrokerPluginSupport {
     private void scheduleRedelivery(ConnectionContext context, MessageReference messageReference, long delay, int redeliveryCount) throws Exception {
         if (LOG.isTraceEnabled()) {
             Destination regionDestination = (Destination) messageReference.getRegionDestination();
-            LOG.trace("redelivery #" + redeliveryCount + " of: " + messageReference.getMessageId() + " with delay: "
-                    + delay + ", dest: " + regionDestination.getActiveMQDestination());
+            LOG.trace("redelivery #{} of: {} with delay: {}, dest: {}", new Object[]{
+                    redeliveryCount, messageReference.getMessageId(), delay, regionDestination.getActiveMQDestination()
+            });
         }
         final Message old = messageReference.getMessage();
         Message message = old.copy();

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java b/activemq-broker/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java
index 11aec54..af6128f 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java
@@ -125,9 +125,7 @@ public class TimeStampingBrokerPlugin extends BrokerPluginSupport {
                     message.setExpiration(expiration);
                 }
                 message.setTimestamp(newTimeStamp);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Set message " + message.getMessageId() + " timestamp from " + oldTimestamp + " to " + newTimeStamp);
-                }
+                LOG.debug("Set message {} timestamp from {} to {}", new Object[]{ message.getMessageId(), oldTimestamp, newTimeStamp });
             }
         }
         super.send(producerExchange, message);

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java b/activemq-broker/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java
index 82608a5..e593aef 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java
@@ -61,7 +61,7 @@ public class TraceBrokerPathPlugin extends BrokerPluginSupport {
                 messageDispatch.getMessage().setMarshalledProperties(null);
             }
         } catch (IOException ioe) {
-            LOG.warn("Setting broker property failed " + ioe, ioe);
+            LOG.warn("Setting broker property failed", ioe);
         }
         super.preProcessDispatch(messageDispatch);
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java b/activemq-broker/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java
index dd35ab6..f023f54 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java
@@ -125,7 +125,7 @@ public class UDPTraceBrokerPlugin extends BrokerPluginSupport {
             socket.send(datagram);
 
         } catch (Throwable e) {
-            LOG.debug("Failed to trace: " + command, e);
+            LOG.debug("Failed to trace: {}", command, e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java b/activemq-broker/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java
index 152fd78..83613b3 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java
@@ -40,9 +40,7 @@ public abstract class DotFileInterceptorSupport extends BrokerFilter {
     }
 
     protected void generateFile() throws Exception {
-        if (log.isDebugEnabled()) {
-            log.debug("Creating DOT file at: " + file);
-        }
+        log.debug("Creating DOT file at: {}", file);
         PrintWriter writer = new PrintWriter(new FileWriter(file));
         try {
             generateFile(writer);

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/view/MessageBrokerView.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/view/MessageBrokerView.java b/activemq-broker/src/main/java/org/apache/activemq/broker/view/MessageBrokerView.java
index 316157a..5ed00f1 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/view/MessageBrokerView.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/view/MessageBrokerView.java
@@ -30,14 +30,11 @@ import org.apache.activemq.command.ActiveMQTempQueue;
 import org.apache.activemq.command.ActiveMQTempTopic;
 import org.apache.activemq.command.ActiveMQTopic;
 import org.apache.activemq.util.LRUCache;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * A view into the running Broker
  */
 public class MessageBrokerView  {
-    private static final Logger LOG = LoggerFactory.getLogger(MessageBrokerView.class);
     private final BrokerService brokerService;
     private Map<ActiveMQDestination,BrokerDestinationView> destinationViewMap = new LRUCache<ActiveMQDestination, BrokerDestinationView>();
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/view/MessageBrokerViewRegistry.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/view/MessageBrokerViewRegistry.java b/activemq-broker/src/main/java/org/apache/activemq/broker/view/MessageBrokerViewRegistry.java
index 9689921..896b448 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/view/MessageBrokerViewRegistry.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/view/MessageBrokerViewRegistry.java
@@ -21,12 +21,9 @@ import java.util.Map;
 
 import org.apache.activemq.broker.BrokerRegistry;
 import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class MessageBrokerViewRegistry {
 
-    private static final Logger LOG = LoggerFactory.getLogger(BrokerRegistry.class);
     private static final MessageBrokerViewRegistry INSTANCE = new MessageBrokerViewRegistry();
 
     private final Object mutex = new Object();

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java b/activemq-broker/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java
index 53a3316..c0442e3 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java
@@ -53,7 +53,7 @@ public class CacheEvictionUsageListener implements UsageListener {
 
     boolean evictMessages() {
         // Try to take the memory usage down below the low mark.
-        LOG.debug("Evicting cache memory usage: " + usage.getPercentUsage());
+        LOG.debug("Evicting cache memory usage: {}", usage.getPercentUsage());
 
         List<CacheEvictor> list = new LinkedList<CacheEvictor>(evictors);
         while (list.size() > 0 && usage.getPercentUsage() > usageLowMark) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java b/activemq-broker/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java
index ad34eca..18b4f89 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java
@@ -24,8 +24,6 @@ import org.apache.activemq.broker.region.MessageReference;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.Message;
 import org.apache.activemq.filter.DestinationFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * A simple fixed size {@link MessageList} where there is a single, fixed size
@@ -36,7 +34,6 @@ import org.slf4j.LoggerFactory;
  * 
  */
 public class SimpleMessageList implements MessageList {
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleMessageList.class);
     private final LinkedList<MessageReference> list = new LinkedList<MessageReference>();
     private int maximumSize = 100 * 64 * 1024;
     private int size;

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/network/ConditionalNetworkBridgeFilterFactory.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/network/ConditionalNetworkBridgeFilterFactory.java b/activemq-broker/src/main/java/org/apache/activemq/network/ConditionalNetworkBridgeFilterFactory.java
index a104a81..61b21bc 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/network/ConditionalNetworkBridgeFilterFactory.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/network/ConditionalNetworkBridgeFilterFactory.java
@@ -106,15 +106,10 @@ public class ConditionalNetworkBridgeFilterFactory implements NetworkBridgeFilte
                 // potential replay back to origin
                 match = allowReplayWhenNoConsumers && hasNoLocalConsumers(message, mec) && hasNotJustArrived(message);
 
-                if (LOG.isTraceEnabled()) {
-                    if (match) {
-                        LOG.trace("Replaying [" + message.getMessageId() + "] for [" + message.getDestination()
-                                + "] back to origin in the absence of a local consumer");
-                    } else {
-                        LOG.trace("Suppressing replay of [" + message.getMessageId() + "] for [" + message.getDestination()
-                                + "] back to origin " + Arrays.asList(message.getBrokerPath()));
-
-                    }
+                if (match) {
+                    LOG.trace("Replaying [{}] for [{}] back to origin in the absence of a local consumer", message.getMessageId(), message.getDestination());
+                } else {
+                    LOG.trace("Suppressing replay of [{}] for [{}] back to origin {}", new Object[]{ message.getMessageId(), message.getDestination(), Arrays.asList(message.getBrokerPath())} );
                 }
 
             } else {
@@ -123,10 +118,9 @@ public class ConditionalNetworkBridgeFilterFactory implements NetworkBridgeFilte
             }
 
             if (match && rateLimitExceeded()) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Throttled network consumer rejecting [" + message.getMessageId() + "] for [" + message.getDestination() + " " + matchCount
-                            + ">" + rateLimit + "/" + rateDuration);
-                }
+                LOG.trace("Throttled network consumer rejecting [{}] for [{}] {}>{}/{}", new Object[]{
+                        message.getMessageId(), message.getDestination(), matchCount, rateLimit, rateDuration
+                });
                 match = false;
             }
 
@@ -142,10 +136,9 @@ public class ConditionalNetworkBridgeFilterFactory implements NetworkBridgeFilte
             List<Subscription> consumers = regionDestination.getConsumers();
             for (Subscription sub : consumers) {
                 if (!sub.getConsumerInfo().isNetworkSubscription() && !sub.getConsumerInfo().isBrowser()) {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("Not replaying [" + message.getMessageId() + "] for [" + message.getDestination()
-                                + "] to origin due to existing local consumer: " + sub.getConsumerInfo());
-                    }
+                    LOG.trace("Not replaying [{}] for [{}] to origin due to existing local consumer: {}", new Object[]{
+                            message.getMessageId(), message.getDestination(), sub.getConsumerInfo()
+                    });
                     return false;
                 }
             }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/network/ConduitBridge.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/network/ConduitBridge.java b/activemq-broker/src/main/java/org/apache/activemq/network/ConduitBridge.java
index 2d1904c..b2bb5c4 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/network/ConduitBridge.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/network/ConduitBridge.java
@@ -18,10 +18,8 @@ package org.apache.activemq.network;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
-import org.apache.activemq.command.BrokerId;
 import org.apache.activemq.command.ConsumerId;
 import org.apache.activemq.command.ConsumerInfo;
 import org.apache.activemq.command.SubscriptionInfo;
@@ -67,9 +65,9 @@ public class ConduitBridge extends DemandForwardingBridge {
         for (DemandSubscription ds : subscriptionMapByLocalId.values()) {
             DestinationFilter filter = DestinationFilter.parseFilter(ds.getLocalInfo().getDestination());
             if (!ds.getRemoteInfo().isNetworkSubscription() && filter.matches(info.getDestination())) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(configuration.getBrokerName() + " " + info + " with ids" + info.getNetworkConsumerIds() + " matched (add interest) " + ds);
-                }
+                LOG.debug("{} {} with ids {} matched (add interest) {}", new Object[]{
+                        configuration.getBrokerName(), info, info.getNetworkConsumerIds(), ds
+                });
                 // add the interest in the subscription
                 if (!info.isDurable()) {
                     ds.add(info.getConsumerId());
@@ -89,9 +87,9 @@ public class ConduitBridge extends DemandForwardingBridge {
 
         for (DemandSubscription ds : subscriptionMapByLocalId.values()) {
             if (ds.remove(id)) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(configuration.getBrokerName() + " on " + localBroker + " from " + remoteBrokerName + " removed interest for: " + id  + " from " + ds);
-                }
+                LOG.debug("{} on {} from {} removed interest for: {} from {}", new Object[]{
+                        configuration.getBrokerName(), localBroker, remoteBrokerName, id, ds
+                });
             }
             if (ds.isEmpty()) {
                 tmpList.add(ds);
@@ -100,9 +98,9 @@ public class ConduitBridge extends DemandForwardingBridge {
 
         for (DemandSubscription ds : tmpList) {
             removeSubscription(ds);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(configuration.getBrokerName() + " on " + localBroker + " from " + remoteBrokerName + " removed " + ds);
-            }
+            LOG.debug("{} on {} from {} removed {}", new Object[]{
+                    configuration.getBrokerName(), localBroker, remoteBrokerName, ds
+            });
         }
     }
 }


Mime
View raw message