diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpSender.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpSender.java index 9b75c1a4c8..ab968b8aa2 100644 --- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpSender.java +++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpSender.java @@ -279,7 +279,7 @@ public class AmqpSender extends AmqpAbstractLink { // Rejection is a terminal outcome, we poison the message for dispatch to // the DLQ. If a custom redelivery policy is used on the broker the message // can still be redelivered based on the configation of that policy. - LOG.trace("onDelivery: Rejected state = {}, message poisoned.", state, md.getRedeliveryCounter()); + LOG.trace("onDelivery: Rejected state = {}, message poisoned.", state); settle(delivery, MessageAck.POSION_ACK_TYPE); } else if (state instanceof Released) { LOG.trace("onDelivery: Released state = {}", state); 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 c064b18312..70a3741409 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java @@ -581,7 +581,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor { if (consumerExchange != null) { broker.acknowledge(consumerExchange, ack); } else if (ack.isInTransaction()) { - LOG.warn("no matching consumer, ignoring ack {}", consumerExchange, ack); + LOG.warn("no matching consumer {}, ignoring ack {}", consumerExchange, ack); } return null; } diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java index a183b673e3..b7761edf49 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java @@ -2092,7 +2092,7 @@ public class Queue extends BaseDestination implements Task, UsageListener, Index ConnectionContext connectionContext = createConnectionContext(); dropMessage(ref); if (gotToTheStore(ref.getMessage())) { - LOG.debug("Duplicate message {} from cursor, removing from store", this, ref.getMessage()); + LOG.debug("Duplicate message {} from cursor, removing from store", ref.getMessage()); store.removeMessage(connectionContext, new MessageAck(ref.getMessage(), MessageAck.POSION_ACK_TYPE, 1)); } broker.getRoot().sendToDeadLetterQueue(connectionContext, ref.getMessage(), null, new Throwable("duplicate paged in from cursor for " + destination)); diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java b/activemq-client/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java index a79fc3e903..d7279881de 100644 --- a/activemq-client/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java +++ b/activemq-client/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java @@ -112,7 +112,7 @@ public class DiscoveryTransport extends TransportFilter implements DiscoveryList try { ((Suspendable)discoveryAgent).suspend(); } catch (Exception e) { - LOG.warn("Exception suspending discoverAgent: ", discoveryAgent); + LOG.warn("Exception suspending discoverAgent: {}", discoveryAgent); } } super.transportResumed(); @@ -124,7 +124,7 @@ public class DiscoveryTransport extends TransportFilter implements DiscoveryList try { ((Suspendable)discoveryAgent).resume(); } catch (Exception e) { - LOG.warn("Exception resuming discoverAgent: ", discoveryAgent); + LOG.warn("Exception resuming discoverAgent: {}", discoveryAgent); } } super.transportInterupted(); diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java index ae555fdf1b..b6f42e69a6 100644 --- a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java +++ b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java @@ -133,7 +133,7 @@ public class TcpTransportFactory extends TransportFactory { String localString = location.getScheme() + ":/" + path; localLocation = new URI(localString); } catch (Exception e) { - LOG.warn("path isn't a valid local location for TcpTransport to use", e.getMessage()); + LOG.warn("path isn't a valid local location for TcpTransport to use: {}", e.getMessage()); if(LOG.isDebugEnabled()) { LOG.debug("Failure detail", e); } diff --git a/activemq-client/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java b/activemq-client/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java index 04539394fb..163dab8a41 100644 --- a/activemq-client/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java +++ b/activemq-client/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java @@ -119,7 +119,7 @@ public class ClassLoadingAwareObjectInputStream extends ObjectInputStream { // check for simple types first final Class clazz = loadSimpleType(className); if (clazz != null) { - LOG.trace("Loaded class: {} as simple type -> ", className, clazz); + LOG.trace("Loaded class: {} as simple type -> {}", className, clazz); return clazz; } @@ -129,7 +129,7 @@ public class ClassLoadingAwareObjectInputStream extends ObjectInputStream { try { Class answer = Class.forName(className, false, loader); if (LOG.isTraceEnabled()) { - LOG.trace("Loaded class: {} using classloader: {} -> ", new Object[]{className, cl, answer}); + LOG.trace("Loaded class: {} using classloader: {} -> {}", className, cl, answer); } return answer; } catch (ClassNotFoundException e) { 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 5cd0474986..e4f7fb86d5 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 @@ -752,7 +752,7 @@ public class MQTTProtocolConverter { public void onResponse(MQTTProtocolConverter converter, Response response) throws IOException { if (response.isException()) { Throwable error = ((ExceptionResponse) response).getException(); - LOG.warn("Failed to send MQTT Publish: ", command, error.getMessage()); + LOG.warn("Failed to send MQTT Publish: {}: {}", command, error.getMessage()); LOG.trace("Error trace: {}", error); } diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java index dcf73e9295..37a3a48827 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java @@ -197,7 +197,7 @@ public class ServerSessionImpl implements ServerSession, InboundContext, Work, D pool.returnToPool(this); break; } else { - log.debug("Session has session has more work to do b/c of unconsumed", this); + log.debug("Session {} has more work to do b/c of unconsumed", this); } } }