diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpConnection.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpConnection.java index 3fe3ab6f7d..31eacc358a 100644 --- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpConnection.java +++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpConnection.java @@ -228,7 +228,7 @@ public class AmqpConnection extends AmqpAbstractResource implements request.sync(closeTimeout, TimeUnit.MILLISECONDS); } } catch (IOException e) { - LOG.warn("Error caught while closing Provider: ", e.getMessage()); + LOG.warn("Error caught while closing Provider: {}", e.getMessage()); } finally { if (transport != null) { try { diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Topic.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Topic.java index 66e586cd4d..7df0138d8c 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Topic.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Topic.java @@ -894,10 +894,10 @@ public class Topic extends BaseDestination implements Task { try { durableTopicSubscription.dispatchPending(); } catch (IOException exception) { - LOG.warn("After clear of pending, failed to dispatch to: {}, for: {}, pending: {}", new Object[]{ + LOG.warn("After clear of pending, failed to dispatch to: {}, for: {}, pending: {}, exception: {}", new Object[]{ durableTopicSubscription, destination, - durableTopicSubscription.pending }, exception); + durableTopicSubscription.pending, exception }); } } } 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 edb0cef956..0623d50442 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 @@ -163,7 +163,7 @@ public class AbortSlowAckConsumerStrategy extends AbortSlowConsumerStrategy { if (getMaxSlowDuration() > 0 && (entry.getValue().markCount * getCheckPeriod() >= getMaxSlowDuration()) || getMaxSlowCount() > 0 && entry.getValue().slowCount >= getMaxSlowCount()) { - LOG.trace("Transferring consumer{} to the abort list: {} slow duration = {}, slow count = {}", + 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() }); diff --git a/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java b/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java index 6a8b66a576..5b8344c22d 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java +++ b/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java @@ -1140,7 +1140,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br } } catch (Exception e) { - LOG.warn("failed to fire forward failure advisory, cause: {}", e); + LOG.warn("failed to fire forward failure advisory, cause: {}", (Object)e); LOG.debug("detail", e); } } diff --git a/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java b/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java index 9595aee823..4a1a78c443 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java +++ b/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java @@ -149,7 +149,7 @@ public abstract class DestinationBridge implements Service, MessageListener { return; } catch (Exception e) { - LOG.info("failed to forward message on attempt: {} reason: {} message: {}", new Object[]{ attempt, e, message }, e); + LOG.info("failed to forward message on attempt: {} reason: {} message: {}", new Object[]{ attempt, e, message }); } } } diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java b/activemq-client/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java index fa46a0e4d7..bef8d7f4cc 100644 --- a/activemq-client/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java +++ b/activemq-client/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java @@ -259,7 +259,7 @@ public abstract class AbstractInactivityMonitor extends TransportFilter { } } else { if (LOG.isTraceEnabled()) { - LOG.trace("Message received since last read check, resetting flag: "); + LOG.trace("Message received since last read check, resetting flag: {}", this); } } commandReceived.set(false); diff --git a/activemq-http/src/test/java/org/apache/activemq/transport/ws/MQTTWSConnection.java b/activemq-http/src/test/java/org/apache/activemq/transport/ws/MQTTWSConnection.java index fd42dc64c9..73cc0e6a41 100644 --- a/activemq-http/src/test/java/org/apache/activemq/transport/ws/MQTTWSConnection.java +++ b/activemq-http/src/test/java/org/apache/activemq/transport/ws/MQTTWSConnection.java @@ -191,7 +191,7 @@ public class MQTTWSConnection extends WebSocketAdapter implements WebSocketListe try { frame = (MQTTFrame)wireFormat.unmarshal(new ByteSequence(data, offset, length)); } catch (IOException e) { - LOG.error("Could not decode incoming MQTT Frame: ", e.getMessage()); + LOG.error("Could not decode incoming MQTT Frame: {}", e.getMessage()); connection.close(); } @@ -245,7 +245,7 @@ public class MQTTWSConnection extends WebSocketAdapter implements WebSocketListe connection.close(); } } catch (Exception e) { - LOG.error("Could not decode incoming MQTT Frame: ", e.getMessage()); + LOG.error("Could not decode incoming MQTT Frame: {}", e.getMessage()); connection.close(); } } diff --git a/activemq-jms-pool/src/test/java/org/apache/activemq/jms/pool/JmsPoolTestSupport.java b/activemq-jms-pool/src/test/java/org/apache/activemq/jms/pool/JmsPoolTestSupport.java index 69c5295757..c32134f1a4 100644 --- a/activemq-jms-pool/src/test/java/org/apache/activemq/jms/pool/JmsPoolTestSupport.java +++ b/activemq-jms-pool/src/test/java/org/apache/activemq/jms/pool/JmsPoolTestSupport.java @@ -54,7 +54,7 @@ public class JmsPoolTestSupport { brokerService.waitUntilStopped(); brokerService = null; } catch (Exception ex) { - LOG.warn("Suppress error on shutdown: {}", ex); + LOG.warn("Suppress error on shutdown: {}", (Object)ex); } } diff --git a/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java b/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java index e4f7fb86d5..1028c16961 100644 --- a/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java +++ b/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java @@ -753,7 +753,7 @@ public class MQTTProtocolConverter { if (response.isException()) { Throwable error = ((ExceptionResponse) response).getException(); LOG.warn("Failed to send MQTT Publish: {}: {}", command, error.getMessage()); - LOG.trace("Error trace: {}", error); + LOG.trace("Error trace: {}", (Object)error); } switch (command.qos()) { diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java index 3864b5c84e..4c3f5c1353 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java @@ -355,4 +355,4 @@ public class ActiveMQResourceAdapter extends ActiveMQConnectionSupport implement } - } +}