Fix unused format arguments in log messages.

This commit is contained in:
Pascal Schumacher 2020-02-10 20:05:21 +01:00
parent 6417d62f60
commit 6764511fa1
8 changed files with 10 additions and 10 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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));

View File

@ -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();

View File

@ -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);
}

View File

@ -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) {

View File

@ -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);
}

View File

@ -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);
}
}
}