[activemq] branch master updated: Fix unused format arguments in log messages.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[activemq] branch master updated: Fix unused format arguments in log messages.

jbonofre-2
This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/master by this push:
     new 6764511  Fix unused format arguments in log messages.
     new 4ecdd5a  Merge pull request #448 from PascalSchumacher/fix_unused_format_arguments_in_log_messages
6764511 is described below

commit 6764511fa1b7efc8df097514f991ff3950f618f1
Author: Pascal Schumacher <[hidden email]>
AuthorDate: Mon Feb 10 20:05:21 2020 +0100

    Fix unused format arguments in log messages.
---
 .../java/org/apache/activemq/transport/amqp/protocol/AmqpSender.java  | 2 +-
 .../src/main/java/org/apache/activemq/broker/TransportConnection.java | 2 +-
 .../src/main/java/org/apache/activemq/broker/region/Queue.java        | 2 +-
 .../org/apache/activemq/transport/discovery/DiscoveryTransport.java   | 4 ++--
 .../java/org/apache/activemq/transport/tcp/TcpTransportFactory.java   | 2 +-
 .../org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java  | 4 ++--
 .../org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java     | 2 +-
 .../src/main/java/org/apache/activemq/ra/ServerSessionImpl.java       | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

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 9b75c1a..ab968b8 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<Sender> {
                 // 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 c064b18..70a3741 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 a183b67..b7761ed 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 a79fc3e..d727988 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 ae555fd..b6f42e6 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 0453939..163dab8 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 5cd0474..e4f7fb8 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 dcf73e9..37a3a48 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);
                     }
                 }
             }