activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [5/5] git commit: https://issues.apache.org/jira/browse/AMQ-4721
Date Fri, 13 Sep 2013 18:53:57 GMT
https://issues.apache.org/jira/browse/AMQ-4721

Upgrade to latest slf4j library and update many LOG statements to use
proper calls (no string concats).  Removes many uneeded isXXXEnabled
checks to clean up the code.  

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/e1bbde73
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/e1bbde73
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/e1bbde73

Branch: refs/heads/trunk
Commit: e1bbde7302d7d169bec978633d2dd85eba2e19cc
Parents: cdb7bb1
Author: Timothy Bish <tabish121@gmai.com>
Authored: Fri Sep 13 14:53:41 2013 -0400
Committer: Timothy Bish <tabish121@gmai.com>
Committed: Fri Sep 13 14:53:41 2013 -0400

----------------------------------------------------------------------
 .../transport/amqp/AmqpNioSslTransport.java     |   2 -
 .../transport/amqp/AmqpProtocolConverter.java   |  83 ++-----
 .../transport/amqp/AmqpTransportFilter.java     |  11 +-
 .../activemq/transport/amqp/AMQ4563Test.java    |  14 +-
 .../activemq/transport/amqp/AMQ4696Test.java    |   6 +-
 .../transport/amqp/AmqpTransformerTest.java     |   5 +-
 .../activemq/transport/amqp/JMSClientTest.java  |   3 -
 .../transport/amqp/SimpleAMQPAuthTest.java      |   2 +-
 .../transport/amqp/joram/ActiveMQNIOAdmin.java  |   3 -
 .../transport/amqp/joram/ActiveMQSSLAdmin.java  |   4 +-
 .../transport/amqp/joram/JoramJmsTest.java      |   3 -
 .../activemq/advisory/AdvisoryBroker.java       |   6 +-
 .../activemq/broker/BrokerPluginSupport.java    |   4 +-
 .../apache/activemq/broker/BrokerRegistry.java  |   2 +-
 .../apache/activemq/broker/BrokerService.java   |  65 +++---
 .../activemq/broker/BrokerStoppedException.java |   2 -
 .../activemq/broker/LockableServiceSupport.java |   4 +-
 .../activemq/broker/ProducerBrokerExchange.java |  18 +-
 .../activemq/broker/SslBrokerService.java       |   1 -
 .../activemq/broker/TransactionBroker.java      |  24 +-
 .../activemq/broker/TransportConnection.java    |  59 ++---
 .../activemq/broker/TransportConnector.java     |   8 +-
 .../broker/TransportStatusDetector.java         |   4 +-
 .../broker/cluster/ConnectionSplitBroker.java   |   2 +-
 .../jmx/AbortSlowConsumerStrategyView.java      |  10 +-
 .../apache/activemq/broker/jmx/BrokerView.java  |   2 +-
 .../broker/jmx/ManagedRegionBroker.java         |  72 +++---
 .../broker/jmx/ManagedTempQueueRegion.java      |   1 -
 .../broker/jmx/ManagedTransportConnection.java  |   8 +-
 .../activemq/broker/jmx/ManagementContext.java  |  24 +-
 .../activemq/broker/region/AbstractRegion.java  |  35 +--
 .../broker/region/AbstractSubscription.java     |   2 +-
 .../broker/region/AbstractTempRegion.java       |   4 +-
 .../activemq/broker/region/BaseDestination.java |   6 +-
 .../broker/region/DurableTopicSubscription.java |   8 +-
 .../broker/region/PrefetchSubscription.java     |  24 +-
 .../apache/activemq/broker/region/Queue.java    | 121 ++++------
 .../broker/region/QueueSubscription.java        |   4 +-
 .../activemq/broker/region/RegionBroker.java    |  33 +--
 .../activemq/broker/region/TempQueue.java       |  12 +-
 .../activemq/broker/region/TempQueueRegion.java |   4 -
 .../activemq/broker/region/TempTopicRegion.java |   1 -
 .../apache/activemq/broker/region/Topic.java    |  23 +-
 .../activemq/broker/region/TopicRegion.java     |   6 +-
 .../broker/region/TopicSubscription.java        |  28 +--
 .../region/cursors/AbstractStoreCursor.java     |  24 +-
 .../cursors/FilePendingMessageCursor.java       |  16 +-
 .../cursors/StoreDurableSubscriberCursor.java   |   6 +-
 .../region/cursors/TopicStorePrefetch.java      |   6 +-
 .../policy/AbortSlowAckConsumerStrategy.java    |  20 +-
 .../policy/AbstractDeadLetterStrategy.java      |   4 +-
 .../policy/DiscardingDeadLetterStrategy.java    |   4 +-
 .../broker/region/policy/PolicyEntry.java       |   4 +-
 .../policy/PriorityNetworkDispatchPolicy.java   |  15 +-
 .../QueryBasedSubscriptionRecoveryPolicy.java   |   2 +-
 .../region/policy/RoundRobinDispatchPolicy.java |   3 -
 .../policy/SubscriptionRecoveryPolicy.java      |   6 +-
 .../UniquePropertyMessageEvictionStrategy.java  |   4 -
 ...ngDurableSubscriberMessageStoragePolicy.java |   1 -
 .../broker/region/virtual/MirroredQueue.java    |   4 +-
 .../region/virtual/VirtualDestination.java      |   1 -
 .../activemq/broker/scheduler/JobSupport.java   |   3 -
 .../broker/scheduler/SchedulerBroker.java       |   8 +-
 .../broker/util/LoggingBrokerPlugin.java        |  94 ++++----
 .../activemq/broker/util/RedeliveryPlugin.java  |   9 +-
 .../broker/util/TimeStampingBrokerPlugin.java   |   4 +-
 .../broker/util/TraceBrokerPathPlugin.java      |   2 +-
 .../broker/util/UDPTraceBrokerPlugin.java       |   2 +-
 .../broker/view/DotFileInterceptorSupport.java  |   4 +-
 .../activemq/broker/view/MessageBrokerView.java |   3 -
 .../broker/view/MessageBrokerViewRegistry.java  |   3 -
 .../memory/CacheEvictionUsageListener.java      |   2 +-
 .../activemq/memory/list/SimpleMessageList.java |   3 -
 .../ConditionalNetworkBridgeFilterFactory.java  |  27 +--
 .../apache/activemq/network/ConduitBridge.java  |  20 +-
 .../network/DemandForwardingBridgeSupport.java  | 231 ++++++++-----------
 .../activemq/network/DemandSubscription.java    |   7 +-
 .../network/DiscoveryNetworkConnector.java      |  46 ++--
 .../activemq/network/DurableConduitBridge.java  |   6 +-
 .../activemq/network/ForwardingBridge.java      |  22 +-
 .../activemq/network/LdapNetworkConnector.java  |  32 +--
 .../activemq/network/MBeanNetworkListener.java  |   8 +-
 .../network/NetworkBridgeConfiguration.java     |   3 -
 .../activemq/network/NetworkConnector.java      |   8 +-
 .../activemq/network/jms/DestinationBridge.java |   3 +-
 .../activemq/network/jms/JmsConnector.java      |  17 +-
 .../network/jms/SimpleJmsQueueConnector.java    |   8 +-
 .../network/jms/SimpleJmsTopicConnector.java    |   8 +-
 .../activemq/plugin/DiscardingDLQBroker.java    |  11 +-
 .../plugin/DiscardingDLQBrokerPlugin.java       |   8 +-
 .../ForcePersistencyModeBrokerPlugin.java       |   2 +-
 .../plugin/SubQueueSelectorCacheBroker.java     |   6 +-
 .../apache/activemq/proxy/ProxyConnection.java  |   2 +-
 .../apache/activemq/proxy/ProxyConnector.java   |   6 +-
 .../SimpleCachedLDAPAuthorizationMap.java       |  51 ++--
 pom.xml                                         |   2 +-
 96 files changed, 590 insertions(+), 964 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpNioSslTransport.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpNioSslTransport.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpNioSslTransport.java
index 398d75a..9109244 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpNioSslTransport.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpNioSslTransport.java
@@ -18,8 +18,6 @@ package org.apache.activemq.transport.amqp;
 
 import org.apache.activemq.transport.nio.NIOSSLTransport;
 import org.apache.activemq.wireformat.WireFormat;
-import org.fusesource.hawtbuf.Buffer;
-import org.fusesource.hawtbuf.DataByteArrayInputStream;
 
 import javax.net.SocketFactory;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
index ff81fb7..b27c76c 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
@@ -138,18 +138,12 @@ class AmqpProtocolConverter {
             ((TransportImpl) protonTransport).setProtocolTracer(new ProtocolTracer() {
                 @Override
                 public void receivedFrame(TransportFrame transportFrame) {
-                    if (TRACE_FRAMES.isTraceEnabled()) {
-                        TRACE_FRAMES.trace(String.format("%s | RECV: %s",
-                                AmqpProtocolConverter.this.amqpTransport.getRemoteAddress(), transportFrame.getBody()));
-                    }
+                    TRACE_FRAMES.trace("{} | RECV: {}", AmqpProtocolConverter.this.amqpTransport.getRemoteAddress(), transportFrame.getBody());
                 }
 
                 @Override
                 public void sentFrame(TransportFrame transportFrame) {
-                    if (TRACE_FRAMES.isTraceEnabled()) {
-                        TRACE_FRAMES.trace(String.format("%s | SENT: %s",
-                                AmqpProtocolConverter.this.amqpTransport.getRemoteAddress(), transportFrame.getBody()));
-                    }
+                    TRACE_FRAMES.trace("{} | SENT: {}", AmqpProtocolConverter.this.amqpTransport.getRemoteAddress(), transportFrame.getBody());
                 }
             });
         }
@@ -359,8 +353,8 @@ class AmqpProtocolConverter {
             ConsumerContext consumerContext = subscriptionsByConsumerId.get(md.getConsumerId());
             if (consumerContext != null) {
                 // End of Queue Browse will have no Message object.
-                if (LOG.isTraceEnabled() && md.getMessage() != null) {
-                    LOG.trace("Dispatching MessageId:{} to consumer", md.getMessage().getMessageId());
+                if (md.getMessage() != null) {
+                    LOG.trace("Dispatching MessageId: {} to consumer", md.getMessage().getMessageId());
                 } else {
                     LOG.trace("Dispatching End of Browse Command to consumer {}", md.getConsumerId());
                 }
@@ -373,9 +367,7 @@ class AmqpProtocolConverter {
         } else if (command.isBrokerInfo()) {
             // ignore
         } else {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Do not know how to process ActiveMQ Command " + command);
-            }
+            LOG.debug("Do not know how to process ActiveMQ Command {}", command);
         }
     }
 
@@ -440,9 +432,7 @@ class AmqpProtocolConverter {
     private void onSessionClose(Session session) {
         AmqpSessionContext sessionContext = (AmqpSessionContext) session.getContext();
         if (sessionContext != null) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Session {} closed", sessionContext.sessionId);
-            }
+            LOG.trace("Session {} closed", sessionContext.sessionId);
             sendToActiveMQ(new RemoveInfo(sessionContext.sessionId), null);
             session.setContext(null);
         }
@@ -473,7 +463,7 @@ class AmqpProtocolConverter {
             } else if (transformer.equals(InboundTransformer.TRANSFORMER_RAW)) {
                 inboundTransformer = new AMQPRawInboundTransformer(ActiveMQJMSVendor.INSTANCE);
             } else {
-                LOG.warn("Unknown transformer type " + transformer + ", using native one instead");
+                LOG.warn("Unknown transformer type {} using native one instead", transformer);
                 inboundTransformer = new AMQPNativeInboundTransformer(ActiveMQJMSVendor.INSTANCE);
             }
         }
@@ -552,10 +542,7 @@ class AmqpProtocolConverter {
             messageId.setProducerId(producerId);
             messageId.setProducerSequenceId(messageIdGenerator.getNextSequenceId());
 
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Inbound Message:{} from Producer:{}", message.getMessageId(),
-                    producerId + ":" + messageId.getProducerSequenceId());
-            }
+            LOG.trace("Inbound Message:{} from Producer:{}", message.getMessageId(), producerId + ":" + messageId.getProducerSequenceId());
 
             DeliveryState remoteState = delivery.getRemoteState();
             if (remoteState != null && remoteState instanceof TransactionalState) {
@@ -621,7 +608,7 @@ class AmqpProtocolConverter {
             }
 
             final Object action = ((AmqpValue) msg.getBody()).getValue();
-            LOG.debug("COORDINATOR received: " + action + ", [" + buffer + "]");
+            LOG.debug("COORDINATOR received: {}, [{}]", action, buffer);
             if (action instanceof Declare) {
                 Declare declare = (Declare) action;
                 if (declare.getGlobalId() != null) {
@@ -631,9 +618,7 @@ class AmqpProtocolConverter {
                 long txid = nextTransactionId++;
                 TransactionInfo txinfo = new TransactionInfo(connectionId, new LocalTransactionId(connectionId, txid), TransactionInfo.BEGIN);
                 sendToActiveMQ(txinfo, null);
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("started transaction " + txid);
-                }
+                LOG.trace("started transaction {}", txid);
 
                 Declared declared = new Declared();
                 declared.setTxnId(new Binary(toBytes(txid)));
@@ -645,14 +630,10 @@ class AmqpProtocolConverter {
 
                 final byte operation;
                 if (discharge.getFail()) {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("rollback transaction " + txid);
-                    }
+                    LOG.trace("rollback transaction {}", txid);
                     operation = TransactionInfo.ROLLBACK;
                 } else {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("commit transaction " + txid);
-                    }
+                    LOG.trace("commit transaction {}", txid);
                     operation = TransactionInfo.COMMIT_ONE_PHASE;
                 }
 
@@ -675,9 +656,7 @@ class AmqpProtocolConverter {
                             rejected.setError(createErrorCondition("failed", er.getException().getMessage()));
                             delivery.disposition(rejected);
                         }
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("TX: {} settling {}", operation, action);
-                        }
+                        LOG.debug("TX: {} settling {}", operation, action);
                         delivery.settle();
                         pumpProtonToSocket();
                     }
@@ -937,9 +916,7 @@ class AmqpProtocolConverter {
                     dispatchedInTx.addFirst(md);
                 }
 
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Sending Ack to ActiveMQ: {}", ack);
-                }
+                LOG.trace("Sending Ack to ActiveMQ: {}", ack);
 
                 sendToActiveMQ(ack, new ResponseHandler() {
                     @Override
@@ -980,9 +957,7 @@ class AmqpProtocolConverter {
                 TransactionalState txState = (TransactionalState) state;
                 if (txState.getOutcome() instanceof DeliveryState) {
 
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("onDelivery: TX delivery state = {}", state);
-                    }
+                    LOG.trace("onDelivery: TX delivery state = {}", state);
 
                     state = (DeliveryState) txState.getOutcome();
 
@@ -995,9 +970,7 @@ class AmqpProtocolConverter {
                 }
             } else {
                 if (state instanceof Accepted) {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("onDelivery: accepted state = {}", state);
-                    }
+                    LOG.trace("onDelivery: accepted state = {}", state);
 
                     if (!delivery.remotelySettled()) {
                         delivery.disposition(new Accepted());
@@ -1006,14 +979,10 @@ class AmqpProtocolConverter {
                 } else if (state instanceof Rejected) {
                     // re-deliver /w incremented delivery counter.
                     md.setRedeliveryCounter(md.getRedeliveryCounter() + 1);
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("onDelivery: Rejected state = {}, delivery count now {}", state, md.getRedeliveryCounter());
-                    }
+                    LOG.trace("onDelivery: Rejected state = {}, delivery count now {}", state, md.getRedeliveryCounter());
                     settle(delivery, -1);
                 } else if (state instanceof Released) {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("onDelivery: Released state = {}", state);
-                    }
+                    LOG.trace("onDelivery: Released state = {}", state);
                     // re-deliver && don't increment the counter.
                     settle(delivery, -1);
                 } else if (state instanceof Modified) {
@@ -1022,9 +991,7 @@ class AmqpProtocolConverter {
                         // increment delivery counter..
                         md.setRedeliveryCounter(md.getRedeliveryCounter() + 1);
                     }
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("onDelivery: Modified state = {}, delivery count now {}", state, md.getRedeliveryCounter());
-                    }
+                    LOG.trace("onDelivery: Modified state = {}, delivery count now {}", state, md.getRedeliveryCounter());
                     byte ackType = -1;
                     Boolean undeliverableHere = modified.getUndeliverableHere();
                     if (undeliverableHere != null && undeliverableHere) {
@@ -1047,9 +1014,7 @@ class AmqpProtocolConverter {
                 pendingTxAck.setTransactionId(md.getMessage().getTransactionId());
                 pendingTxAck.setFirstMessageId(dispatchedInTx.getLast().getMessage().getMessageId());
 
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Sending commit Ack to ActiveMQ: {}", pendingTxAck);
-                }
+                LOG.trace("Sending commit Ack to ActiveMQ: {}", pendingTxAck);
 
                 dispatchedInTx.clear();
 
@@ -1073,9 +1038,7 @@ class AmqpProtocolConverter {
         void doRollback() throws Exception {
             synchronized (outbound) {
 
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Rolling back {} messages for redelivery. ", dispatchedInTx.size());
-                }
+                LOG.trace("Rolling back {} messages for redelivery. ", dispatchedInTx.size());
 
                 for (MessageDispatch md : dispatchedInTx) {
                     md.setRedeliveryCounter(md.getRedeliveryCounter() + 1);
@@ -1265,9 +1228,7 @@ class AmqpProtocolConverter {
 
     void handleException(Throwable exception) {
         exception.printStackTrace();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Exception detail", exception);
-        }
+        LOG.debug("Exception detail", exception);
         try {
             amqpTransport.stop();
         } catch (Throwable e) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpTransportFilter.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpTransportFilter.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpTransportFilter.java
index dab1c77..8fe9e3e 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpTransportFilter.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpTransportFilter.java
@@ -87,8 +87,8 @@ public class AmqpTransportFilter extends TransportFilter implements AmqpTranspor
 
     public void onCommand(Object command) {
         try {
-            if (trace && TRACE_BYTES.isTraceEnabled()) {
-                TRACE_BYTES.trace("Received: \n" + command);
+            if (trace) {
+                TRACE_BYTES.trace("Received: \n{}", command);
             }
             protocolConverter.lock.lock();
             try {
@@ -113,8 +113,8 @@ public class AmqpTransportFilter extends TransportFilter implements AmqpTranspor
 
     public void sendToAmqp(Object command) throws IOException {
         assert protocolConverter.lock.isHeldByCurrentThread();
-        if (trace && TRACE_BYTES.isTraceEnabled()) {
-            TRACE_BYTES.trace("Sending: \n" + command);
+        if (trace) {
+            TRACE_BYTES.trace("Sending: \n{}", command);
         }
         Transport n = next;
         if (n != null) {
@@ -156,13 +156,10 @@ public class AmqpTransportFilter extends TransportFilter implements AmqpTranspor
         return this.wireFormat;
     }
 
-
-
     public void handleException(IOException e) {
         super.onException(e);
     }
 
-
     public String getTransformer() {
         return transformer;
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AMQ4563Test.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AMQ4563Test.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AMQ4563Test.java
index 5eae826..d0215be 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AMQ4563Test.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AMQ4563Test.java
@@ -64,7 +64,7 @@ public class AMQ4563Test extends AmqpTestSupport {
             message = session.createTextMessage();
             String messageText = "Hello " + i + " sent at " + new java.util.Date().toString();
             message.setText(messageText);
-            LOG.debug(">>>> Sent [" + messageText + "]");
+            LOG.debug(">>>> Sent [{}]", messageText);
             p.send(message);
         }
 
@@ -97,7 +97,7 @@ public class AMQ4563Test extends AmqpTestSupport {
         // Restart broker.
         restartBroker(connection, session);
         String selector = "JMSMessageID = '" + message.getJMSMessageID() + "'";
-        LOG.info("Using selector: "+selector);
+        LOG.info("Using selector: {}", selector);
         int messagesReceived = readAllMessages(queue, selector);
         assertEquals(1, messagesReceived);
     }
@@ -120,7 +120,7 @@ public class AMQ4563Test extends AmqpTestSupport {
         // Restart broker.
         restartBroker(connection, session);
         String selector = "JMSMessageID = '" + message.getJMSMessageID() + "'";
-        LOG.info("Using selector: "+selector);
+        LOG.info("Using selector: {}", selector);
         int messagesReceived = readAllMessages(queue, selector);
         assertEquals(1, messagesReceived);
     }
@@ -140,7 +140,7 @@ public class AMQ4563Test extends AmqpTestSupport {
             message = session.createTextMessage();
             String messageText = "Hello " + i + " sent at " + new java.util.Date().toString();
             message.setText(messageText);
-            LOG.debug(">>>> Sent [" + messageText + "]");
+            LOG.debug(">>>> Sent [{}]", messageText);
             p.send(message);
         }
 
@@ -175,7 +175,7 @@ public class AMQ4563Test extends AmqpTestSupport {
                 assertNotNull(msg);
                 assertTrue(msg instanceof TextMessage);
                 TextMessage textMessage = (TextMessage) msg;
-                LOG.debug(">>>> Received [" + textMessage.getText() + "]");
+                LOG.debug(">>>> Received [{}]", textMessage.getText());
                 messagesReceived++;
                 msg = consumer.receive(5000);
             }
@@ -196,7 +196,7 @@ public class AMQ4563Test extends AmqpTestSupport {
     }
 
     private Connection createAMQPConnection() throws JMSException {
-        LOG.debug(">>> In createConnection using port " + port);
+        LOG.debug(">>> In createConnection using port {}", port);
         final ConnectionFactoryImpl factory = new ConnectionFactoryImpl("localhost", port, "admin", "password");
         final Connection connection = factory.createConnection();
         connection.setExceptionListener(new ExceptionListener() {
@@ -210,7 +210,7 @@ public class AMQ4563Test extends AmqpTestSupport {
     }
 
     private Connection createAMQConnection() throws JMSException {
-        LOG.debug(">>> In createConnection using port " + port);
+        LOG.debug(">>> In createConnection using port {}", port);
         final ConnectionFactory factory = new ActiveMQConnectionFactory("admin", "password", openwireUri);
         final Connection connection = factory.createConnection();
         connection.setExceptionListener(new ExceptionListener() {

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AMQ4696Test.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AMQ4696Test.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AMQ4696Test.java
index 4d674a2..29b485e 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AMQ4696Test.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AMQ4696Test.java
@@ -42,7 +42,7 @@ public class AMQ4696Test extends AmqpTestSupport {
         BrokerView adminView = this.brokerService.getAdminView();
         int durableSubscribersAtStart = adminView.getDurableTopicSubscribers().length;
         int inactiveSubscribersAtStart = adminView.getInactiveDurableTopicSubscribers().length;
-        LOG.debug(">>>> At Start, durable Subscribers " + durableSubscribersAtStart + " inactiveDurableSubscribers " + inactiveSubscribersAtStart);
+        LOG.debug(">>>> At Start, durable Subscribers {} inactiveDurableSubscribers {}", durableSubscribersAtStart, inactiveSubscribersAtStart);
 
         TopicConnectionFactory factory = new ConnectionFactoryImpl("localhost", port, "admin", "password");
         Topic topic = new TopicImpl("topic://" + TOPIC_NAME);
@@ -55,7 +55,7 @@ public class AMQ4696Test extends AmqpTestSupport {
 
         int durableSubscribers = adminView.getDurableTopicSubscribers().length;
         int inactiveSubscribers = adminView.getInactiveDurableTopicSubscribers().length;
-        LOG.debug(">>>> durable Subscribers after creation " + durableSubscribers + " inactiveDurableSubscribers " + inactiveSubscribers);
+        LOG.debug(">>>> durable Subscribers after creation {} inactiveDurableSubscribers {}", durableSubscribers, inactiveSubscribers);
         assertEquals("Wrong number of durable subscribers after first subscription", 1, (durableSubscribers - durableSubscribersAtStart));
         assertEquals("Wrong number of inactive durable subscribers after first subscription", 0, (inactiveSubscribers - inactiveSubscribersAtStart));
 
@@ -64,7 +64,7 @@ public class AMQ4696Test extends AmqpTestSupport {
 
         durableSubscribers = adminView.getDurableTopicSubscribers().length;
         inactiveSubscribers = adminView.getInactiveDurableTopicSubscribers().length;
-        LOG.debug(">>>> durable Subscribers after close " + durableSubscribers + " inactiveDurableSubscribers " + inactiveSubscribers);
+        LOG.debug(">>>> durable Subscribers after close {} inactiveDurableSubscribers {}", durableSubscribers, inactiveSubscribers);
         assertEquals("Wrong number of durable subscribers after close", 0, (durableSubscribersAtStart));
         assertEquals("Wrong number of inactive durable subscribers after close", 1, (inactiveSubscribers - inactiveSubscribersAtStart));
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java
index 8a52ee0..3b4aecf 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java
@@ -42,9 +42,6 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
- */
 public class AmqpTransformerTest {
 
     private static final Logger LOG = LoggerFactory.getLogger(AmqpTransformerTest.class);
@@ -135,7 +132,7 @@ public class AmqpTransformerTest {
         Message message = c.receive(2000);
 
         assertNotNull("Should have received a message", message);
-        LOG.info("Recieved message: ", message);
+        LOG.info("Recieved message: {}", message);
         assertTrue(message instanceof BytesMessage);
         Boolean nativeTransformationUsed = message.getBooleanProperty("JMS_AMQP_NATIVE");
         Long messageFormat = message.getLongProperty("JMS_AMQP_MESSAGE_FORMAT");

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTest.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTest.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTest.java
index 6029e1c..16fde4e 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTest.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTest.java
@@ -42,9 +42,6 @@ import org.junit.Test;
 import org.junit.rules.TestName;
 import org.objectweb.jtests.jms.framework.TestConfig;
 
-/**
- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- */
 public class JMSClientTest extends AmqpTestSupport {
 
     @Rule public TestName name = new TestName();

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/SimpleAMQPAuthTest.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/SimpleAMQPAuthTest.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/SimpleAMQPAuthTest.java
index 9e241c3..d41f845 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/SimpleAMQPAuthTest.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/SimpleAMQPAuthTest.java
@@ -160,7 +160,7 @@ public class SimpleAMQPAuthTest {
     }
 
     protected BrokerService createBroker(String uri) throws Exception {
-        LOG.debug(">>>>> Loading broker configuration from the classpath with URI: " + uri);
+        LOG.debug(">>>>> Loading broker configuration from the classpath with URI: {}", uri);
         return BrokerFactory.createBroker(new URI("xbean:" +  uri));
     }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/ActiveMQNIOAdmin.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/ActiveMQNIOAdmin.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/ActiveMQNIOAdmin.java
index 43b88ec..33247d0 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/ActiveMQNIOAdmin.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/ActiveMQNIOAdmin.java
@@ -16,9 +16,6 @@
  */
 package org.apache.activemq.transport.amqp.joram;
 
-/**
- * @author Kevin Earls
- */
 public class ActiveMQNIOAdmin extends ActiveMQAdmin {
     private static final String AMQP_NIO_URI = "amqp+nio://localhost:0";
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/ActiveMQSSLAdmin.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/ActiveMQSSLAdmin.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/ActiveMQSSLAdmin.java
index a42ed54..558e905 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/ActiveMQSSLAdmin.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/ActiveMQSSLAdmin.java
@@ -68,7 +68,7 @@ public class ActiveMQSSLAdmin extends ActiveMQAdmin {
         String connectorURI = getConnectorURI();
         TransportConnector connector = broker.addConnector(connectorURI);
         port = connector.getConnectUri().getPort();
-        LOG.info("ssl port is " + port);
+        LOG.info("ssl port is {}", port);
 
         broker.start();
         //broker.
@@ -83,7 +83,7 @@ public class ActiveMQSSLAdmin extends ActiveMQAdmin {
     @Override
     public void createConnectionFactory(String name) {
         try {
-            LOG.debug("Creating a connection factory using port " + port);
+            LOG.debug("Creating a connection factory using port {}", port);
             final ConnectionFactory factory = new ConnectionFactoryImpl("localhost", port, null, null, null, true);
             context.bind(name, factory);
         } catch (NamingException e) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
index ad8a01f..938f8f5 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
@@ -38,9 +38,6 @@ import org.objectweb.jtests.jms.conform.session.SessionTest;
 import org.objectweb.jtests.jms.conform.session.UnifiedSessionTest;
 import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
 
-/**
- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- */
 public class JoramJmsTest extends TestCase {
 
     public static Test suite() {

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java b/activemq-broker/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
index 9dce5fc..6571699 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
@@ -512,10 +512,8 @@ public class AdvisoryBroker extends BrokerFilter {
     }
 
     private void handleFireFailure(String message, Throwable cause) {
-        LOG.warn("Failed to fire "  + message + " advisory, reason: " + cause);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug(message + " detail", cause);
-        }
+        LOG.warn("Failed to fire {} advisory, reason: {}", message, cause);
+        LOG.debug("{} detail: {}", message, cause);
     }
 
     protected void fireAdvisory(ConnectionContext context, ActiveMQTopic topic, Command command) throws Exception {

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java
index a9f9850..59f7bcc 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java
@@ -38,13 +38,13 @@ public abstract class BrokerPluginSupport extends MutableBrokerFilter implements
     @Override
     public void start() throws Exception {
         super.start();
-        LOG.info("Broker Plugin " + getClass().getName() + " started");
+        LOG.info("Broker Plugin {} started", getClass().getName());
     }
     
     @Override
     public void stop() throws Exception {
         super.stop();
-        LOG.info("Broker Plugin " + getClass().getName() + " stopped");
+        LOG.info("Broker Plugin {} stopped", getClass().getName());
     }
     
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerRegistry.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerRegistry.java b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerRegistry.java
index 2d1482f..67d8eac 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerRegistry.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerRegistry.java
@@ -49,7 +49,7 @@ public class BrokerRegistry {
             if (result == null && brokerName != null && brokerName.equals(BrokerService.DEFAULT_BROKER_NAME)) {
                 result = findFirst();
                 if (result != null) {
-                    LOG.warn("Broker localhost not started so using " + result.getBrokerName() + " instead");
+                    LOG.warn("Broker localhost not started so using {} instead", result.getBrokerName());
                 }
             }
             if (result == null && (brokerName==null || brokerName.isEmpty() || brokerName.equals("null"))){

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
index 0e75154..0f585e1 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
@@ -568,7 +568,7 @@ public class BrokerService implements Service {
             startBroker(startAsync);
             brokerRegistry.bind(getBrokerName(), BrokerService.this);
         } catch (Exception e) {
-            LOG.error("Failed to start Apache ActiveMQ (" + getBrokerName() + ", " + brokerId + "). Reason: " + e, e);
+            LOG.error("Failed to start Apache ActiveMQ ({}, {})", new Object[]{ getBrokerName(), brokerId }, e);
             try {
                 if (!stopped.get()) {
                     stop();
@@ -606,7 +606,7 @@ public class BrokerService implements Service {
     private void doStartPersistenceAdapter() throws Exception {
         getPersistenceAdapter().setUsageManager(getProducerSystemUsage());
         getPersistenceAdapter().setBrokerName(getBrokerName());
-        LOG.info("Using Persistence Adapter: " + getPersistenceAdapter());
+        LOG.info("Using Persistence Adapter: {}", getPersistenceAdapter());
         if (deleteAllMessagesOnStartup) {
             deleteAllMessages();
         }
@@ -644,10 +644,7 @@ public class BrokerService implements Service {
         brokerId = broker.getBrokerId();
 
         // need to log this after creating the broker so we have its id and name
-        if (LOG.isInfoEnabled()) {
-            LOG.info("Apache ActiveMQ " + getBrokerVersion() + " ("
-                    + getBrokerName() + ", " + brokerId + ") is starting");
-        }
+        LOG.info("Apache ActiveMQ {} ({}, {}) is starting", new Object[]{ getBrokerVersion(), getBrokerName(), brokerId });
         broker.start();
 
         if (isUseJmx()) {
@@ -668,11 +665,8 @@ public class BrokerService implements Service {
 
         startAllConnectors();
 
-        if (LOG.isInfoEnabled()) {
-            LOG.info("Apache ActiveMQ " + getBrokerVersion() + " ("
-                    + getBrokerName() + ", " + brokerId + ") started");
-            LOG.info("For help or more information please see: http://activemq.apache.org");
-        }
+        LOG.info("Apache ActiveMQ {} ({}, {}) started", new Object[]{ getBrokerVersion(), getBrokerName(), brokerId});
+        LOG.info("For help or more information please see: http://activemq.apache.org");
 
         getBroker().brokerServiceStarted();
         checkSystemUsageLimits();
@@ -717,10 +711,7 @@ public class BrokerService implements Service {
             }.start();
         }
 
-        if (LOG.isInfoEnabled()) {
-            LOG.info("Apache ActiveMQ " + getBrokerVersion() + " ("
-                    + getBrokerName() + ", " + brokerId + ") is shutting down");
-        }
+        LOG.info("Apache ActiveMQ {} ({}, {}) is shutting down", new Object[]{ getBrokerVersion(), getBrokerName(), brokerId} );
 
         removeShutdownHook();
         if (this.scheduler != null) {
@@ -780,14 +771,10 @@ public class BrokerService implements Service {
         this.destinationInterceptors = null;
         this.destinationFactory = null;
 
-        if (LOG.isInfoEnabled()) {
-            if (startDate != null) {
-                LOG.info("Apache ActiveMQ " + getBrokerVersion() + " ("
-                        + getBrokerName() + ", " + brokerId + ") uptime " + getUptime());
-            }
-            LOG.info("Apache ActiveMQ " + getBrokerVersion() + " ("
-                    + getBrokerName() + ", " + brokerId + ") is shutdown");
+        if (startDate != null) {
+            LOG.info("Apache ActiveMQ {} ({}, {}) uptime {}", new Object[]{ getBrokerVersion(), getBrokerName(), brokerId, getUptime()});
         }
+        LOG.info("Apache ActiveMQ {} ({}, {}) is shutdown", new Object[]{ getBrokerVersion(), getBrokerName(), brokerId});
 
         synchronized (shutdownHooks) {
             for (Runnable hook : shutdownHooks) {
@@ -817,8 +804,7 @@ public class BrokerService implements Service {
                     queueSize = entry.getValue().getDestinationStatistics().getMessages().getCount();
                     count += queueSize;
                     if (queueSize > 0) {
-                        LOG.info("Queue has pending message:" + entry.getValue().getName() + " queueSize is:"
-                                + queueSize);
+                        LOG.info("Queue has pending message: {} queueSize is: {}", entry.getValue().getName(), queueSize);
                     }
                 }
             }
@@ -850,8 +836,9 @@ public class BrokerService implements Service {
             if (pollInterval <= 0) {
                 pollInterval = 30;
             }
-            LOG.info("Stop gracefully with connectorName:" + connectorName + " queueName:" + queueName + " timeout:"
-                    + timeout + " pollInterval:" + pollInterval);
+            LOG.info("Stop gracefully with connectorName: {} queueName: {} timeout: {} pollInterval: {}", new Object[]{
+                    connectorName, queueName, timeout, pollInterval
+            });
             TransportConnector connector;
             for (int i = 0; i < transportConnectors.size(); i++) {
                 connector = transportConnectors.get(i);
@@ -953,7 +940,7 @@ public class BrokerService implements Service {
         }
         String str = brokerName.replaceAll("[^a-zA-Z0-9\\.\\_\\-\\:]", "_");
         if (!str.equals(brokerName)) {
-            LOG.error("Broker Name: " + brokerName + " contained illegal characters - replaced with " + str);
+            LOG.error("Broker Name: {} contained illegal characters - replaced with {}", brokerName, str);
         }
         this.brokerName = str.trim();
     }
@@ -1151,7 +1138,7 @@ public class BrokerService implements Service {
      */
     public void setPersistenceAdapter(PersistenceAdapter persistenceAdapter) throws IOException {
         if (!isPersistent() && ! (persistenceAdapter instanceof MemoryPersistenceAdapter)) {
-            LOG.warn("persistent=\"false\", ignoring configured persistenceAdapter: " + persistenceAdapter);
+            LOG.warn("persistent=\"false\", ignoring configured persistenceAdapter: {}", persistenceAdapter);
             return;
         }
         this.persistenceAdapter = persistenceAdapter;
@@ -1508,7 +1495,7 @@ public class BrokerService implements Service {
             try {
                 vmConnectorURI = new URI("vm://" + getBrokerName().replaceAll("[^a-zA-Z0-9\\.\\_\\-]", "_"));
             } catch (URISyntaxException e) {
-                LOG.error("Badly formed URI from " + getBrokerName(), e);
+                LOG.error("Badly formed URI from {}", getBrokerName(), e);
             }
         }
         return vmConnectorURI;
@@ -1526,7 +1513,7 @@ public class BrokerService implements Service {
                     try {
                         result = tc.getPublishableConnectString();
                     } catch (Exception e) {
-                      LOG.warn("Failed to get the ConnectURI for "+tc,e);
+                      LOG.warn("Failed to get the ConnectURI for {}", tc, e);
                     }
                     if (result != null) {
                         // find first publishable uri
@@ -1657,7 +1644,7 @@ public class BrokerService implements Service {
                 }
                 if (!empty) {
                     String str = result ? "Successfully deleted" : "Failed to delete";
-                    LOG.info(str + " temporary storage");
+                    LOG.info("{} temporary storage", str);
                 }
 
                 String clazz = "org.apache.activemq.store.kahadb.plist.PListStoreImpl";
@@ -1845,7 +1832,7 @@ public class BrokerService implements Service {
                 jobSchedulerStore.setDirectory(getSchedulerDirectoryFile());
                 configureService(jobSchedulerStore);
                 jobSchedulerStore.start();
-                LOG.info("JobScheduler using directory: " + getSchedulerDirectoryFile());
+                LOG.info("JobScheduler using directory: {}", getSchedulerDirectoryFile());
             } catch (Exception e) {
                 throw new RuntimeException(e);
             }
@@ -2099,7 +2086,7 @@ public class BrokerService implements Service {
                 ObjectName objectName = createNetworkConnectorObjectName(connector);
                 getManagementContext().unregisterMBean(objectName);
             } catch (Exception e) {
-                LOG.error("Network Connector could not be unregistered from JMX: " + e, e);
+                LOG.error("Network Connector could not be unregistered from JMX", e);
             }
         }
     }
@@ -2185,7 +2172,7 @@ public class BrokerService implements Service {
                 regionBroker = new ManagedRegionBroker(this, getManagementContext(), getBrokerObjectName(),
                     getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor());
             } catch(MalformedObjectNameException me){
-                LOG.error("Couldn't create ManagedRegionBroker",me);
+                LOG.error("Couldn't create ManagedRegionBroker", me);
                 throw new IOException(me);
             }
         } else {
@@ -2315,7 +2302,7 @@ public class BrokerService implements Service {
         Object port = options.get("port");
         if (port == null) {
             port = DEFAULT_PORT;
-            LOG.warn("No port specified so defaulting to: " + port);
+            LOG.warn("No port specified so defaulting to: {}", port);
         }
         return port;
     }
@@ -2337,7 +2324,7 @@ public class BrokerService implements Service {
             try {
                 Runtime.getRuntime().removeShutdownHook(shutdownHook);
             } catch (Exception e) {
-                LOG.debug("Caught exception, must be shutting down: " + e);
+                LOG.debug("Caught exception, must be shutting down", e);
             }
         }
     }
@@ -2470,10 +2457,10 @@ public class BrokerService implements Service {
                         @Override
                         public void run() {
                             try {
-                                LOG.info("Async start of " + connector);
+                                LOG.info("Async start of {}", connector);
                                 connector.start();
                             } catch(Exception e) {
-                                LOG.error("Async start of network connector: " + connector + " failed", e);
+                                LOG.error("Async start of network connector: {} failed", connector, e);
                             }
                         }
                     });
@@ -2538,7 +2525,7 @@ public class BrokerService implements Service {
         if (ioExceptionHandler != null) {
             ioExceptionHandler.handle(exception);
          } else {
-            LOG.info("No IOExceptionHandler registered, ignoring IO exception, " + exception, exception);
+            LOG.info("No IOExceptionHandler registered, ignoring IO exception", exception);
          }
     }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerStoppedException.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerStoppedException.java b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerStoppedException.java
index 974017f..d0a8c3d 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerStoppedException.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerStoppedException.java
@@ -19,8 +19,6 @@ package org.apache.activemq.broker;
 /**
  * This exception is thrown by the broker when you try to use it after it has
  * been stopped.
- * 
- * @author chirino
  */
 public class BrokerStoppedException extends IllegalStateException {
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java b/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java
index 2475201..13ae02d 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java
@@ -122,7 +122,7 @@ public abstract class LockableServiceSupport extends ServiceSupport implements L
                 }
             }
         } catch (IOException e) {
-            LOG.warn("locker keepAlive resulted in: " + e, e);
+            LOG.warn("locker keepAlive resulted in", e);
         }
         if (stop) {
             stopBroker();
@@ -131,7 +131,7 @@ public abstract class LockableServiceSupport extends ServiceSupport implements L
 
     protected void stopBroker() {
         // we can no longer keep the lock so lets fail
-        LOG.error(brokerService.getBrokerName() + ", no longer able to keep the exclusive lock so giving up being a master");
+        LOG.error("{}, no longer able to keep the exclusive lock so giving up being a master", brokerService.getBrokerName());
         try {
             if( brokerService.isRestartAllowed() ) {
                 brokerService.requestRestart();

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java b/activemq-broker/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java
index dd5ef5d..b3b383e 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java
@@ -143,17 +143,15 @@ public class ProducerBrokerExchange {
                 long lastStoredForMessageProducer = getStoredSequenceIdForMessage(messageSend.getMessageId());
                 if (producerSequenceId <= lastStoredForMessageProducer) {
                     canDispatch = false;
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("suppressing duplicate message send  [" + (LOG.isTraceEnabled() ? messageSend : messageSend.getMessageId()) + "] from network producer with producerSequenceId ["
-                                + producerSequenceId + "] less than last stored: " + lastStoredForMessageProducer);
-                    }
+                    LOG.debug("suppressing duplicate message send [{}] from network producer with producerSequence [{}] less than last stored: {}", new Object[]{
+                            (LOG.isTraceEnabled() ? messageSend : messageSend.getMessageId()), producerSequenceId, lastStoredForMessageProducer
+                    });
                 }
             } else if (producerSequenceId <= lastSendSequenceNumber.get()) {
                 canDispatch = false;
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("suppressing duplicate message send [" + (LOG.isTraceEnabled() ? messageSend : messageSend.getMessageId()) + "] with producerSequenceId ["
-                            + producerSequenceId + "] less than last stored: " + lastSendSequenceNumber);
-                }
+                LOG.debug("suppressing duplicated message send [{}] with producerSequenceId [{}] less than last stored: {}", new Object[]{
+                        (LOG.isTraceEnabled() ? messageSend : messageSend.getMessageId()), producerSequenceId, lastSendSequenceNumber
+                });
             } else {
                 // track current so we can suppress duplicates later in the stream
                 lastSendSequenceNumber.set(producerSequenceId);
@@ -166,7 +164,7 @@ public class ProducerBrokerExchange {
         try {
             return brokerService.getPersistenceAdapter().getLastProducerSequenceId(messageId.getProducerId());
         } catch (IOException ignored) {
-            LOG.debug("Failed to determine last producer sequence id for: " + messageId, ignored);
+            LOG.debug("Failed to determine last producer sequence id for: {}", messageId, ignored);
         }
         return -1;
     }
@@ -178,7 +176,7 @@ public class ProducerBrokerExchange {
             isNetworkProducer = true;
         }
         lastSendSequenceNumber.set(l);
-        LOG.debug("last stored sequence id set: " + l);
+        LOG.debug("last stored sequence id set: {}", l);
     }
 
     public void incrementSend() {

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/SslBrokerService.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/SslBrokerService.java b/activemq-broker/src/main/java/org/apache/activemq/broker/SslBrokerService.java
index 834f663..8cc944d 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/SslBrokerService.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/SslBrokerService.java
@@ -25,7 +25,6 @@ import java.security.SecureRandom;
 import javax.net.ssl.KeyManager;
 import javax.net.ssl.TrustManager;
 
-import org.apache.activemq.transport.TransportFactory;
 import org.apache.activemq.transport.TransportFactorySupport;
 import org.apache.activemq.transport.TransportServer;
 import org.apache.activemq.transport.tcp.SslTransportFactory;

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/TransactionBroker.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/TransactionBroker.java b/activemq-broker/src/main/java/org/apache/activemq/broker/TransactionBroker.java
index e4a4c7c..26ddfab 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/TransactionBroker.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/TransactionBroker.java
@@ -107,9 +107,7 @@ public class TransactionBroker extends BrokerFilter {
                         }
                         transaction.setState(Transaction.PREPARED_STATE);
                         registerMBean(transaction);
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("recovered prepared transaction: " + transaction.getTransactionId());
-                        }
+                        LOG.debug("recovered prepared transaction: {}", transaction.getTransactionId());
                     } catch (Throwable e) {
                         throw new WrappedException(e);
                     }
@@ -177,9 +175,7 @@ public class TransactionBroker extends BrokerFilter {
         public void afterRollback() throws Exception {
             if (!messageSend) {
                 destination.clearPendingMessages();
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("cleared pending from afterRollback : " + destination);
-                }
+                LOG.debug("cleared pending from afterRollback: {}", destination);
             }
         }
 
@@ -189,9 +185,7 @@ public class TransactionBroker extends BrokerFilter {
                 destination.clearPendingMessages();
                 destination.getDestinationStatistics().getEnqueues().add(opCount);
                 destination.getDestinationStatistics().getMessages().add(opCount);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("cleared pending from afterCommit : " + destination);
-                }
+                LOG.debug("cleared pending from afterCommit: {}", destination);
             } else {
                 destination.getDestinationStatistics().getDequeues().add(opCount);
                 destination.getDestinationStatistics().getMessages().subtract(opCount);
@@ -215,18 +209,14 @@ public class TransactionBroker extends BrokerFilter {
             for (Iterator<XATransaction> iter = xaTransactions.values().iterator(); iter.hasNext();) {
                 Transaction tx = iter.next();
                 if (tx.isPrepared()) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("prepared transaction: " + tx.getTransactionId());
-                    }
+                    LOG.debug("prepared transaction: {}", tx.getTransactionId());
                     txs.add(tx.getTransactionId());
                 }
             }
         }
         XATransactionId rc[] = new XATransactionId[txs.size()];
         txs.toArray(rc);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("prepared transaction list size: " + rc.length);
-        }
+        LOG.debug("prepared transaction list size: {}", rc.length);
         return rc;
     }
 
@@ -322,9 +312,7 @@ public class TransactionBroker extends BrokerFilter {
             if (sync != null && transaction != null) {
                 transaction.removeSynchronization(sync);
             }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("IGNORING duplicate message " + message);
-            }
+            LOG.debug("IGNORING duplicate message {}", message);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
index a7a06db..725e83d 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
@@ -185,7 +185,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
         if (bService.isShutdownOnSlaveFailure()) {
             if (brokerInfo != null) {
                 if (brokerInfo.isSlaveBroker()) {
-                    LOG.error("Slave has exception: " + e.getMessage() + " shutting down master now.", e);
+                    LOG.error("Slave has exception: {} shutting down master now.", e.getMessage(), e);
                     try {
                         doStop();
                         bService.stop();
@@ -247,9 +247,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
             // Handle the case where the broker is stopped
             // But the client is still connected.
             if (!stopping.get()) {
-                if (SERVICELOG.isDebugEnabled()) {
-                    SERVICELOG.debug("Broker has been stopped.  Notifying client and closing his connection.");
-                }
+                SERVICELOG.debug("Broker has been stopped.  Notifying client and closing his connection.");
                 ConnectionError ce = new ConnectionError();
                 ce.setException(e);
                 dispatchSync(ce);
@@ -269,7 +267,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
         } else if (!stopping.get() && !inServiceException) {
             inServiceException = true;
             try {
-                SERVICELOG.warn("Async error occurred: " + e, e);
+                SERVICELOG.warn("Async error occurred: ", e);
                 ConnectionError ce = new ConnectionError();
                 ce.setException(e);
                 if (pendingStop) {
@@ -659,14 +657,14 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
             try {
                 processRemoveConsumer(consumerId, lastDeliveredSequenceId);
             } catch (Throwable e) {
-                LOG.warn("Failed to remove consumer: " + consumerId + ". Reason: " + e, e);
+                LOG.warn("Failed to remove consumer: {}", consumerId, e);
             }
         }
         for (ProducerId producerId : session.getProducerIds()) {
             try {
                 processRemoveProducer(producerId);
             } catch (Throwable e) {
-                LOG.warn("Failed to remove producer: " + producerId + ". Reason: " + e, e);
+                LOG.warn("Failed to remove producer: {}", producerId, e);
             }
         }
         cs.removeSession(id);
@@ -697,16 +695,15 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
         // to figure out the winner.
         synchronized (state.getConnectionMutex()) {
             if (state.getConnection() != this) {
-                LOG.debug("Killing previous stale connection: " + state.getConnection().getRemoteAddress());
+                LOG.debug("Killing previous stale connection: {}", state.getConnection().getRemoteAddress());
                 state.getConnection().stop();
-                LOG.debug("Connection " + getRemoteAddress() + " taking over previous connection: "
-                        + state.getConnection().getRemoteAddress());
+                LOG.debug("Connection {} taking over previous connection: {}", getRemoteAddress(), state.getConnection().getRemoteAddress());
                 state.setConnection(this);
                 state.reset(info);
             }
         }
         registerConnectionState(info.getConnectionId(), state);
-        LOG.debug("Setting up new connection id: " + info.getConnectionId() + ", address: " + getRemoteAddress() + ", info: " + info);
+        LOG.debug("Setting up new connection id: {}, address: {}, info: {}", new Object[]{ info.getConnectionId(), getRemoteAddress(), info });
         this.faultTolerantConnection = info.isFaultTolerant();
         // Setup the context.
         String clientId = info.getClientId();
@@ -739,10 +736,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
                 brokerConnectionStates.remove(info.getConnectionId());
             }
             unregisterConnectionState(info.getConnectionId());
-            LOG.warn("Failed to add Connection " + info.getConnectionId() + ", reason: " + e.toString());
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Exception detail:", e);
-            }
+            LOG.warn("Failed to add Connection {}", info.getConnectionId(), e);
             if (e instanceof SecurityException) {
                 // close this down - in case the peer of this transport doesn't play nice
                 delayedStop(2000, "Failed with SecurityException: " + e.getLocalizedMessage(), e);
@@ -764,7 +758,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
     @Override
     public synchronized Response processRemoveConnection(ConnectionId id, long lastDeliveredSequenceId)
             throws InterruptedException {
-        LOG.debug("remove connection id: " + id);
+        LOG.debug("remove connection id: {}", id);
         TransportConnectionState cs = lookupConnectionState(id);
         if (cs != null) {
             // Don't allow things to be added to the connection state while we
@@ -775,7 +769,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
                 try {
                     processRemoveSession(sessionId, lastDeliveredSequenceId);
                 } catch (Throwable e) {
-                    SERVICELOG.warn("Failed to remove session " + sessionId, e);
+                    SERVICELOG.warn("Failed to remove session {}", sessionId, e);
                 }
             }
             // Cascade the connection stop to temp destinations.
@@ -784,17 +778,14 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
                 try {
                     broker.removeDestination(cs.getContext(), di.getDestination(), 0);
                 } catch (Throwable e) {
-                    SERVICELOG.warn("Failed to remove tmp destination " + di.getDestination(), e);
+                    SERVICELOG.warn("Failed to remove tmp destination {}", di.getDestination(), e);
                 }
                 iter.remove();
             }
             try {
                 broker.removeConnection(cs.getContext(), cs.getInfo(), null);
             } catch (Throwable e) {
-                SERVICELOG.warn("Failed to remove connection " + cs.getInfo() + ", reason: " + e.toString());
-                if (LOG.isDebugEnabled()) {
-                    SERVICELOG.debug("Exception detail:", e);
-                }
+                SERVICELOG.warn("Failed to remove connection {}", cs.getInfo(), e);
             }
             TransportConnectionState state = unregisterConnectionState(id);
             if (state != null) {
@@ -977,7 +968,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
             // stop() runs, so queue the stop until right now:
             setStarting(false);
             if (isPendingStop()) {
-                LOG.debug("Calling the delayed stop() after start() " + this);
+                LOG.debug("Calling the delayed stop() after start() {}", this);
                 stop();
             }
         }
@@ -990,7 +981,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
 
         stopAsync();
         while (!stopped.await(5, TimeUnit.SECONDS)) {
-            LOG.info("The connection to '" + transport.getRemoteAddress() + "' is taking a long time to shutdown.");
+            LOG.info("The connection to '{}' is taking a long time to shutdown.", transport.getRemoteAddress());
         }
     }
 
@@ -1007,7 +998,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
                         try {
                             Thread.sleep(waitTime);
                             stopAsync();
-                            LOG.info("Stopping " + transport.getRemoteAddress() + " because " + reason);
+                            LOG.info("Stopping {} because {}", transport.getRemoteAddress(), reason);
                         } catch (InterruptedException e) {
                         }
                     }
@@ -1045,7 +1036,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
                         try {
                             doStop();
                         } catch (Throwable e) {
-                            LOG.debug("Error occurred while shutting down a connection " + this, e);
+                            LOG.debug("Error occurred while shutting down a connection {}", this, e);
                         } finally {
                             stopped.countDown();
                             serviceLock.writeLock().unlock();
@@ -1078,9 +1069,9 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
         }
         try {
             transport.stop();
-            LOG.debug("Stopped transport: " + transport.getRemoteAddress());
+            LOG.debug("Stopped transport: {}", transport.getRemoteAddress());
         } catch (Exception e) {
-            LOG.debug("Could not stop transport to " + transport.getRemoteAddress() + ". This exception is ignored.", e);
+            LOG.debug("Could not stop transport to {}. This exception is ignored.", transport.getRemoteAddress(), e);
         }
         if (taskRunner != null) {
             taskRunner.shutdown(1);
@@ -1265,7 +1256,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
     @Override
     public Response processBrokerInfo(BrokerInfo info) {
         if (info.isSlaveBroker()) {
-            LOG.error(" Slave Brokers are no longer supported - slave trying to attach is: " + info.getBrokerName());
+            LOG.error(" Slave Brokers are no longer supported - slave trying to attach is: {}", info.getBrokerName());
         } else if (info.isNetworkConnection() && info.isDuplexConnection()) {
             // so this TransportConnection is the rear end of a network bridge
             // We have been requested to create a two way pipe ...
@@ -1288,7 +1279,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
                     for (Iterator<TransportConnection> iter = connections.iterator(); iter.hasNext(); ) {
                         TransportConnection c = iter.next();
                         if ((c != this) && (duplexNetworkConnectorId.equals(c.getDuplexNetworkConnectorId()))) {
-                            LOG.warn("Stopping an existing active duplex connection [" + c + "] for network connector (" + duplexNetworkConnectorId + ").");
+                            LOG.warn("Stopping an existing active duplex connection [{}] for network connector ({}).", c, duplexNetworkConnectorId);
                             c.stopAsync();
                             // better to wait for a bit rather than get connection id already in use and failure to start new bridge
                             c.getStopped().await(1, TimeUnit.SECONDS);
@@ -1314,19 +1305,19 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
                 info.setDuplexConnection(false);
                 duplexBridge.setCreatedByDuplex(true);
                 duplexBridge.duplexStart(this, brokerInfo, info);
-                LOG.info("Started responder end of duplex bridge " + duplexNetworkConnectorId);
+                LOG.info("Started responder end of duplex bridge {}", duplexNetworkConnectorId);
                 return null;
             } catch (TransportDisposedIOException e) {
-                LOG.warn("Duplex bridge " + duplexNetworkConnectorId + " was stopped before it was correctly started.");
+                LOG.warn("Duplex bridge {} was stopped before it was correctly started.", duplexNetworkConnectorId);
                 return null;
             } catch (Exception e) {
-                LOG.error("Failed to create responder end of duplex network bridge " + duplexNetworkConnectorId, e);
+                LOG.error("Failed to create responder end of duplex network bridge {}", duplexNetworkConnectorId, e);
                 return null;
             }
         }
         // We only expect to get one broker info command per connection
         if (this.brokerInfo != null) {
-            LOG.warn("Unexpected extra broker info command received: " + info);
+            LOG.warn("Unexpected extra broker info command received: {}", info);
         }
         this.brokerInfo = info;
         networkConnection = true;

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
index 7c78a44..fff5212 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
@@ -252,14 +252,12 @@ public class TransportConnector implements Connector, BrokerServiceAware {
             this.statusDector.start();
         }
 
-        LOG.info("Connector " + getName() + " Started");
+        LOG.info("Connector {} Started", getName());
     }
 
     public String getPublishableConnectString() throws Exception {
         String publishableConnectString = publishedAddressPolicy.getPublishableConnectString(this);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Publishing: " + publishableConnectString + " for broker transport URI: " + getConnectUri());
-        }
+        LOG.debug("Publishing: {} for broker transport URI: {}", publishableConnectString, getConnectUri());
         return publishableConnectString;
     }
 
@@ -285,7 +283,7 @@ public class TransportConnector implements Connector, BrokerServiceAware {
         }
         server = null;
         ss.throwFirstException();
-        LOG.info("Connector " + getName() + " Stopped");
+        LOG.info("Connector {} Stopped", getName());
     }
 
     // Implementation methods

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java
index 0e0db7e..03eed94 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java
@@ -86,11 +86,11 @@ public class TransportStatusDetector implements Service, Runnable {
     }
 
     protected void doCollection(TransportConnection tc) {
-        LOG.warn("found a blocked client - stopping: " + tc);
+        LOG.warn("found a blocked client - stopping: {}", tc);
         try {
             tc.stop();
         } catch (Exception e) {
-            LOG.error("Error stopping " + tc, e);
+            LOG.error("Error stopping {}", tc, e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java b/activemq-broker/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java
index fc206d5..ff2fc76 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java
@@ -71,7 +71,7 @@ public class ConnectionSplitBroker extends BrokerFilter{
                     for (ConsumerInfo nc : gcList) {
                         networkConsumerList.remove(nc);
                         super.removeConsumer(context, nc);
-                        LOG.warn("Removed stale network consumer " + nc);
+                        LOG.warn("Removed stale network consumer {}", nc);
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/AbortSlowConsumerStrategyView.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/AbortSlowConsumerStrategyView.java b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/AbortSlowConsumerStrategyView.java
index aa268d1..43902a0 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/AbortSlowConsumerStrategyView.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/AbortSlowConsumerStrategyView.java
@@ -80,10 +80,10 @@ public class AbortSlowConsumerStrategyView implements AbortSlowConsumerStrategyV
     public void abortConsumer(ObjectName consumerToAbort) {
         Subscription sub = broker.getSubscriber(consumerToAbort);
         if (sub != null) {
-            LOG.info("aborting consumer via jmx: " + sub.getConsumerInfo().getConsumerId());           
+            LOG.info("aborting consumer via jmx: {}", sub.getConsumerInfo().getConsumerId());
             strategy.abortConsumer(sub, false);
         } else {
-            LOG.warn("cannot resolve subscription matching name: " + consumerToAbort);
+            LOG.warn("cannot resolve subscription matching name: {}", consumerToAbort);
         }
 
     }
@@ -91,10 +91,10 @@ public class AbortSlowConsumerStrategyView implements AbortSlowConsumerStrategyV
     public void abortConnection(ObjectName consumerToAbort) {
         Subscription sub = broker.getSubscriber(consumerToAbort);
         if (sub != null) {
-            LOG.info("aborting consumer connection via jmx: " + sub.getConsumerInfo().getConsumerId().getConnectionId());
+            LOG.info("aborting consumer connection via jmx: {}", sub.getConsumerInfo().getConsumerId().getConnectionId());
             strategy.abortConsumer(sub, true);
         } else {
-            LOG.warn("cannot resolve subscription matching name: " + consumerToAbort);
+            LOG.warn("cannot resolve subscription matching name: {}", consumerToAbort);
         }
     }
 
@@ -111,7 +111,7 @@ public class AbortSlowConsumerStrategyView implements AbortSlowConsumerStrategyV
         try {
             result = new ObjectName(objectName);
         } catch (Exception e) {
-            LOG.warn("cannot create subscription ObjectName to abort, from string: " + objectName);
+            LOG.warn("cannot create subscription ObjectName to abort, from string: {}", objectName);
         }
         return result;
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1bbde73/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
index cb96a42..91e9609 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
@@ -94,7 +94,7 @@ public class BrokerView implements BrokerViewMBean {
         try {
             brokerService.getPersistenceAdapter().checkpoint(true);
         } catch (IOException e) {
-            LOG.error("Failed to checkpoint persistence adapter on gc request, reason:" + e, e);
+            LOG.error("Failed to checkpoint persistence adapter on gc request", e);
         }
     }
 


Mime
View raw message