You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pa...@apache.org on 2017/11/08 23:14:09 UTC
[camel] branch master updated: replace string concatenation in log
messages with placeholders
This is an automated email from the ASF dual-hosted git repository.
pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new f6ac3d8 replace string concatenation in log messages with placeholders
f6ac3d8 is described below
commit f6ac3d81420d3f53b029a0f0c31dd4610810e2c2
Author: Pascal Schumacher <pa...@gmx.net>
AuthorDate: Wed Nov 8 23:22:57 2017 +0100
replace string concatenation in log messages with placeholders
---
.../org/apache/camel/builder/AdviceWithTasks.java | 8 ++++----
.../apache/camel/component/bean/MethodInfo.java | 2 +-
.../camel/component/file/GenericFileConsumer.java | 2 +-
.../component/file/GenericFileOnCompletion.java | 4 ++--
.../apache/camel/component/mock/MockEndpoint.java | 8 ++++----
.../apache/camel/impl/ActiveMQUuidGenerator.java | 2 +-
.../impl/DefaultAsyncProcessorAwaitManager.java | 2 +-
.../org/apache/camel/impl/DefaultCamelContext.java | 24 +++++++++++-----------
.../apache/camel/impl/DefaultExchangeHolder.java | 2 +-
.../camel/impl/DefaultInflightRepository.java | 2 +-
.../impl/DefaultPackageScanClassResolver.java | 2 +-
.../apache/camel/impl/DefaultShutdownStrategy.java | 6 +++---
.../apache/camel/impl/DefaultUuidGenerator.java | 2 +-
.../impl/InterceptSendToMockEndpointStrategy.java | 2 +-
.../apache/camel/impl/UriEndpointComponent.java | 2 +-
.../converter/AnnotationTypeConverterLoader.java | 4 ++--
.../java/org/apache/camel/main/MainSupport.java | 6 +++---
.../apache/camel/processor/ThroughputLogger.java | 2 +-
.../processor/aggregate/AggregateProcessor.java | 8 ++++----
.../interceptor/DefaultTraceEventHandler.java | 2 +-
.../camel/support/ReloadStrategySupport.java | 2 +-
.../camel/util/component/ApiMethodParser.java | 2 +-
.../java/org/apache/camel/LanguageTestSupport.java | 2 +-
.../test/java/org/apache/camel/TestSupport.java | 8 ++++----
.../org/apache/camel/TestSupportJmxCleanup.java | 2 +-
.../camel/component/ComponentDiscoveryTest.java | 2 +-
.../apache/camel/component/bean/BeanInfoTest.java | 2 +-
.../bean/BeanInvocationSerializeTest.java | 2 +-
.../camel/component/bean/NewInstanceTest.java | 2 +-
.../apache/camel/component/browse/BrowseTest.java | 2 +-
.../camel/impl/ComponentConfigurationTest.java | 2 +-
.../org/apache/camel/impl/CustomIdFactoryTest.java | 2 +-
.../issues/TypeConverterConcurrencyIssueTest.java | 2 +-
...okenPairIteratorSplitChoicePerformanceTest.java | 4 ++--
.../language/XPathRouteConcurrentBigTest.java | 4 ++--
.../language/XPathSplitChoicePerformanceTest.java | 2 +-
.../camel/management/EndpointCompletionTest.java | 4 ++--
.../java/org/apache/camel/model/XmlParseTest.java | 4 ++--
.../camel/processor/BeanRecipientListTest.java | 2 +-
.../org/apache/camel/processor/BeanRouteTest.java | 2 +-
.../camel/processor/MyLoggingSentEventNotifer.java | 2 +-
.../RedeliveryErrorHandlerBlockedDelayTest.java | 4 ++--
.../RedeliveryErrorHandlerNonBlockedDelayTest.java | 4 ++--
...ErrorHandlerNonBlockedRedeliveryHeaderTest.java | 4 ++--
.../RedeliveryOnExceptionBlockedDelayTest.java | 4 ++--
.../camel/processor/RoutePerformanceCountTest.java | 2 +-
.../camel/processor/RoutePerformanceTest.java | 2 +-
.../aggregator/AggregatorConcurrencyTest.java | 2 +-
...RedeliveryErrorHandlerNonBlockedDelay2Test.java | 4 ++--
...tRedeliveryErrorHandlerNonBlockedDelayTest.java | 4 ++--
50 files changed, 89 insertions(+), 89 deletions(-)
diff --git a/camel-core/src/main/java/org/apache/camel/builder/AdviceWithTasks.java b/camel-core/src/main/java/org/apache/camel/builder/AdviceWithTasks.java
index 27f3456..a56182a 100644
--- a/camel-core/src/main/java/org/apache/camel/builder/AdviceWithTasks.java
+++ b/camel-core/src/main/java/org/apache/camel/builder/AdviceWithTasks.java
@@ -183,7 +183,7 @@ public final class AdviceWithTasks {
Object old = outputs.remove(index);
// must set parent on the node we added in the route
replace.setParent(output.getParent());
- LOG.info("AdviceWith (" + matchBy.getId() + ") : [" + old + "] --> replace [" + replace + "]");
+ LOG.info("AdviceWith ({}) : [{}] --> replace [{}]", matchBy.getId(), old, replace);
}
}
}
@@ -235,7 +235,7 @@ public final class AdviceWithTasks {
if (index != -1) {
match = true;
Object old = outputs.remove(index);
- LOG.info("AdviceWith (" + matchBy.getId() + ") : [" + old + "] --> remove");
+ LOG.info("AdviceWith ({}) : [{}] --> remove", matchBy.getId(), old);
}
}
}
@@ -290,7 +290,7 @@ public final class AdviceWithTasks {
outputs.add(index, before);
// must set parent on the node we added in the route
before.setParent(output.getParent());
- LOG.info("AdviceWith (" + matchBy.getId() + ") : [" + existing + "] --> before [" + before + "]");
+ LOG.info("AdviceWith ({}) : [{}] --> before [{}]", matchBy.getId(), existing, before);
}
}
}
@@ -345,7 +345,7 @@ public final class AdviceWithTasks {
outputs.add(index + 1, after);
// must set parent on the node we added in the route
after.setParent(output.getParent());
- LOG.info("AdviceWith (" + matchBy.getId() + ") : [" + existing + "] --> after [" + after + "]");
+ LOG.info("AdviceWith ({}) : [{}] --> after [{}]", matchBy.getId(), existing, after);
}
}
}
diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java b/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
index 08aa6c2..8285b06 100644
--- a/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
+++ b/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
@@ -566,7 +566,7 @@ public class MethodInfo {
if (answer == null) {
answer = another;
} else {
- LOG.warn("Duplicate pattern annotation: " + another + " found on annotation: " + annotation + " which will be ignored");
+ LOG.warn("Duplicate pattern annotation: {} found on annotation: {} which will be ignored", another, annotation);
}
}
}
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
index 836a52f..b6d7d67 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
@@ -125,7 +125,7 @@ public abstract class GenericFileConsumer<T> extends ScheduledBatchPollingConsum
} catch (Exception e) {
// during poll directory we add files to the in progress repository, in case of any exception thrown after this work
// we must then drain the in progress files before rethrowing the exception
- log.debug("Error occurred during poll directory: " + name + " due " + e.getMessage() + ". Removing " + files.size() + " files marked as in-progress.");
+ log.debug("Error occurred during poll directory: {} due {}. Removing {} files marked as in-progress.", name, e.getMessage(), files.size());
removeExcessiveInProgressFiles(files);
throw e;
}
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java
index edc0774..caaa15d 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java
@@ -141,7 +141,7 @@ public class GenericFileOnCompletion<T> implements Synchronization {
Exchange exchange, GenericFile<T> file) {
if (log.isWarnEnabled()) {
- log.warn("Rollback file strategy: " + processStrategy + " for file: " + file);
+ log.warn("Rollback file strategy: {} for file: {}", processStrategy, file);
}
// only delete done file if moveFailed option is enabled, as otherwise on rollback,
@@ -172,7 +172,7 @@ public class GenericFileOnCompletion<T> implements Synchronization {
boolean deleted = operations.deleteFile(doneFileName);
log.trace("Done file: {} was deleted: {}", doneFileName, deleted);
if (!deleted) {
- log.warn("Done file: " + doneFileName + " could not be deleted");
+ log.warn("Done file: {} could not be deleted", doneFileName);
}
} catch (Exception e) {
handleException("Error deleting done file: " + doneFileName, exchange, e);
diff --git a/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
index b147adb..5c39d67 100644
--- a/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
@@ -380,12 +380,12 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint {
* should wait for the test to be true
*/
public void assertIsSatisfied(long timeoutForEmptyEndpoints) throws InterruptedException {
- LOG.info("Asserting: " + this + " is satisfied");
+ LOG.info("Asserting: {} is satisfied", this);
doAssertIsSatisfied(timeoutForEmptyEndpoints);
if (assertPeriod > 0) {
// if an assert period was set then re-assert again to ensure the assertion is still valid
Thread.sleep(assertPeriod);
- LOG.info("Re-asserting: " + this + " is satisfied after " + assertPeriod + " millis");
+ LOG.info("Re-asserting: {} is satisfied after {} millis", this, assertPeriod);
// do not use timeout when we re-assert
doAssertIsSatisfied(0);
}
@@ -394,7 +394,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint {
protected void doAssertIsSatisfied(long timeoutForEmptyEndpoints) throws InterruptedException {
if (expectedCount == 0) {
if (timeoutForEmptyEndpoints > 0) {
- LOG.debug("Sleeping for: " + timeoutForEmptyEndpoints + " millis to check there really are no messages received");
+ LOG.debug("Sleeping for: {} millis to check there really are no messages received", timeoutForEmptyEndpoints);
Thread.sleep(timeoutForEmptyEndpoints);
}
assertEquals("Received message count", expectedCount, getReceivedCounter());
@@ -1467,7 +1467,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint {
long waitTime = timeout == 0 ? 10000L : timeout;
// now let's wait for the results
- LOG.debug("Waiting on the latch for: " + timeout + " millis");
+ LOG.debug("Waiting on the latch for: {} millis", timeout);
latch.await(waitTime, TimeUnit.MILLISECONDS);
}
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java b/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java
index 84202a0..8dfc017 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java
@@ -91,7 +91,7 @@ public class ActiveMQUuidGenerator implements UuidGenerator {
if (LOG.isTraceEnabled()) {
LOG.trace("Cannot generate unique stub by using DNS and binding to local port: " + idGeneratorPort, e);
} else {
- LOG.warn("Cannot generate unique stub by using DNS and binding to local port: " + idGeneratorPort + " due " + e.getMessage());
+ LOG.warn("Cannot generate unique stub by using DNS and binding to local port: {} due {}", idGeneratorPort, e.getMessage());
}
// Restore interrupted state so higher level code can deal with it.
if (e instanceof InterruptedException) {
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultAsyncProcessorAwaitManager.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultAsyncProcessorAwaitManager.java
index d0d306b..bea06a7 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultAsyncProcessorAwaitManager.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultAsyncProcessorAwaitManager.java
@@ -188,7 +188,7 @@ public class DefaultAsyncProcessorAwaitManager extends ServiceSupport implements
Collection<AwaitThread> threads = browse();
int count = threads.size();
if (count > 0) {
- LOG.warn("Shutting down while there are still " + count + " inflight threads currently blocked.");
+ LOG.warn("Shutting down while there are still {} inflight threads currently blocked.", count);
StringBuilder sb = new StringBuilder();
for (AwaitThread entry : threads) {
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index bbbaf69..481585b 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -3046,7 +3046,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
protected void doSuspend() throws Exception {
EventHelper.notifyCamelContextSuspending(this);
- log.info("Apache Camel " + getVersion() + " (CamelContext: " + getName() + ") is suspending");
+ log.info("Apache Camel {} (CamelContext: {}) is suspending", getVersion(), getName());
StopWatch watch = new StopWatch();
// update list of started routes to be suspended
@@ -3084,7 +3084,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
watch.stop();
if (log.isInfoEnabled()) {
- log.info("Apache Camel " + getVersion() + " (CamelContext: " + getName() + ") is suspended in " + TimeUtils.printDuration(watch.taken()));
+ log.info("Apache Camel {} (CamelContext: {}) is suspended in {}", getVersion(), getName(), TimeUtils.printDuration(watch.taken()));
}
EventHelper.notifyCamelContextSuspended(this);
@@ -3095,7 +3095,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
try {
EventHelper.notifyCamelContextResuming(this);
- log.info("Apache Camel " + getVersion() + " (CamelContext: " + getName() + ") is resuming");
+ log.info("Apache Camel {} (CamelContext: {}) is resuming", getVersion(), getName());
StopWatch watch = new StopWatch();
// start the suspended routes (do not check for route clashes, and indicate)
@@ -3111,8 +3111,8 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
}
if (log.isInfoEnabled()) {
- log.info("Resumed " + suspendedRouteServices.size() + " routes");
- log.info("Apache Camel " + getVersion() + " (CamelContext: " + getName() + ") resumed in " + TimeUtils.printDuration(watch.taken()));
+ log.info("Resumed {} routes", suspendedRouteServices.size());
+ log.info("Apache Camel {} (CamelContext: {}) resumed in {}", getVersion(), getName(), TimeUtils.printDuration(watch.taken()));
}
// and clear the list as they have been resumed
@@ -3131,7 +3131,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
vetoStated.set(false);
startDate = new Date();
stopWatch.restart();
- log.info("Apache Camel " + getVersion() + " (CamelContext: " + getName() + ") is starting");
+ log.info("Apache Camel {} (CamelContext: {}) is starting", getVersion(), getName());
// Note: This is done on context start as we want to avoid doing it during object construction
// where we could be dealing with CDI proxied camel contexts which may never be started (CAMEL-9657)
@@ -3192,7 +3192,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
);
}
- log.info("Apache Camel " + getVersion() + " (CamelContext: " + getName() + ") started in " + TimeUtils.printDuration(stopWatch.taken()));
+ log.info("Apache Camel {} (CamelContext: {}) started in {}", getVersion(), getName(), TimeUtils.printDuration(stopWatch.taken()));
}
EventHelper.notifyCamelContextStarted(this);
@@ -3491,7 +3491,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
protected synchronized void doStop() throws Exception {
stopWatch.restart();
- log.info("Apache Camel " + getVersion() + " (CamelContext: " + getName() + ") is shutting down");
+ log.info("Apache Camel {} (CamelContext: {}) is shutting down", getVersion(), getName());
EventHelper.notifyCamelContextStopping(this);
// Stop the route controller
@@ -3583,7 +3583,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
if (log.isInfoEnabled()) {
log.info("Apache Camel " + getVersion() + " (CamelContext: " + getName() + ") uptime {}", getUptime());
- log.info("Apache Camel " + getVersion() + " (CamelContext: " + getName() + ") is shutdown in " + TimeUtils.printDuration(stopWatch.taken()));
+ log.info("Apache Camel {} (CamelContext: {}) is shutdown in {}", getVersion(), getName(), TimeUtils.printDuration(stopWatch.taken()));
}
// and clear start date
@@ -3962,7 +3962,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
// if we are starting camel, then skip routes which are configured to not be auto started
boolean autoStartup = routeService.getRouteDefinition().isAutoStartup(this) && this.isAutoStartup();
if (addingRoute && !autoStartup) {
- log.info("Skipping starting of route " + routeService.getId() + " as its configured with autoStartup=false");
+ log.info("Skipping starting of route {} as its configured with autoStartup=false", routeService.getId());
continue;
}
@@ -4006,7 +4006,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
if (resumeOnly && route.supportsSuspension()) {
// if we are resuming and the route can be resumed
ServiceHelper.resumeService(consumer);
- log.info("Route: " + route.getId() + " resumed and consuming from: " + endpoint);
+ log.info("Route: {} resumed and consuming from: {}", route.getId(), endpoint);
} else {
// when starting we should invoke the lifecycle strategies
for (LifecycleStrategy strategy : lifecycleStrategies) {
@@ -4020,7 +4020,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
throw e;
}
- log.info("Route: " + route.getId() + " started and consuming from: " + endpoint);
+ log.info("Route: {} started and consuming from: {}", route.getId(), endpoint);
}
routeInputs.add(endpoint);
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultExchangeHolder.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultExchangeHolder.java
index 77c74f6..003e7f6 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultExchangeHolder.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultExchangeHolder.java
@@ -264,7 +264,7 @@ public class DefaultExchangeHolder implements Serializable {
if (converted != null) {
return converted;
} else {
- LOG.warn("Exchange " + type + " containing object: " + object + " of type: " + object.getClass().getCanonicalName() + " cannot be serialized, it will be excluded by the holder.");
+ LOG.warn("Exchange {} containing object: {} of type: {} cannot be serialized, it will be excluded by the holder.", type, object, object.getClass().getCanonicalName());
return null;
}
}
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java
index 011f309..de693b4 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java
@@ -178,7 +178,7 @@ public class DefaultInflightRepository extends ServiceSupport implements Infligh
protected void doStop() throws Exception {
int count = size();
if (count > 0) {
- LOG.warn("Shutting down while there are still " + count + " inflight exchanges.");
+ LOG.warn("Shutting down while there are still {} inflight exchanges.", count);
} else {
LOG.debug("Shutting down with no inflight exchanges.");
}
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
index 4f12eac..03a7916 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
@@ -72,7 +72,7 @@ public class DefaultPackageScanClassResolver extends ServiceSupport implements P
}
} catch (Exception e) {
// Ignore this exception
- log.warn("Cannot add ContextClassLoader from current thread due " + e.getMessage() + ". This exception will be ignored.");
+ log.warn("Cannot add ContextClassLoader from current thread due {}. This exception will be ignored.", e.getMessage());
}
classLoaders.add(DefaultPackageScanClassResolver.class.getClassLoader());
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultShutdownStrategy.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultShutdownStrategy.java
index 304c492..34e6207 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultShutdownStrategy.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultShutdownStrategy.java
@@ -190,9 +190,9 @@ public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownS
}
if (suspendOnly) {
- LOG.info("Starting to graceful suspend " + routesOrdered.size() + " routes (timeout " + timeout + " " + timeUnit.toString().toLowerCase(Locale.ENGLISH) + ")");
+ LOG.info("Starting to graceful suspend {} routes (timeout {} {})", routesOrdered.size(), timeout, timeUnit.toString().toLowerCase(Locale.ENGLISH));
} else {
- LOG.info("Starting to graceful shutdown " + routesOrdered.size() + " routes (timeout " + timeout + " " + timeUnit.toString().toLowerCase(Locale.ENGLISH) + ")");
+ LOG.info("Starting to graceful shutdown {} routes (timeout {} {})", routesOrdered.size(), timeout, timeUnit.toString().toLowerCase(Locale.ENGLISH));
}
// use another thread to perform the shutdowns so we can support timeout
@@ -257,7 +257,7 @@ public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownS
// convert to seconds as its easier to read than a big milli seconds number
long seconds = TimeUnit.SECONDS.convert(watch.taken(), TimeUnit.MILLISECONDS);
- LOG.info("Graceful shutdown of " + routesOrdered.size() + " routes completed in " + seconds + " seconds");
+ LOG.info("Graceful shutdown of {} routes completed in {} seconds", routesOrdered.size(), seconds);
return true;
}
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultUuidGenerator.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultUuidGenerator.java
index 4c99030..e283844 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultUuidGenerator.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultUuidGenerator.java
@@ -61,7 +61,7 @@ public class DefaultUuidGenerator implements UuidGenerator {
if (LOG.isTraceEnabled()) {
LOG.trace("Cannot generate unique stub by using DNS", e);
} else {
- LOG.warn("Cannot generate unique stub by using DNS due " + e.getMessage() + ". This exception is ignored.");
+ LOG.warn("Cannot generate unique stub by using DNS due {}. This exception is ignored.", e.getMessage());
}
}
}
diff --git a/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToMockEndpointStrategy.java b/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToMockEndpointStrategy.java
index 7ab2502..5743d03 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToMockEndpointStrategy.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToMockEndpointStrategy.java
@@ -91,7 +91,7 @@ public class InterceptSendToMockEndpointStrategy implements EndpointStrategy {
if (key.contains("?")) {
key = ObjectHelper.before(key, "?");
}
- LOG.info("Adviced endpoint [" + uri + "] with mock endpoint [" + key + "]");
+ LOG.info("Adviced endpoint [{}] with mock endpoint [{}]", uri, key);
MockEndpoint mock = endpoint.getCamelContext().getEndpoint(key, MockEndpoint.class);
Producer producer;
diff --git a/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java b/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java
index c6a39fc..504e2f4 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java
@@ -104,7 +104,7 @@ public abstract class UriEndpointComponent extends DefaultComponent {
populateParameterConfigurationMap(parameterMap, fieldType, nestedPrefix);
} else {
if (parameterMap.containsKey(propertyName)) {
- LOG.warn("Duplicate property name " + propertyName + " defined on field " + field);
+ LOG.warn("Duplicate property name {} defined on field {}", propertyName, field);
} else {
parameterMap.put(propertyName,
ParameterConfiguration.newInstance(propertyName, field, uriParam));
diff --git a/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java b/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java
index eb1bd4b..b8c3aab 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java
@@ -108,7 +108,7 @@ public class AnnotationTypeConverterLoader implements TypeConverterLoader {
Set<Class<?>> classes = new HashSet<Class<?>>();
packageNames = filterPackageNamesOnly(resolver, packageNames, classes);
if (!classes.isEmpty()) {
- LOG.debug("Loaded " + classes.size() + " @Converter classes");
+ LOG.debug("Loaded {} @Converter classes", classes.size());
}
// if there is any packages to scan and load @Converter classes, then do it
@@ -118,7 +118,7 @@ public class AnnotationTypeConverterLoader implements TypeConverterLoader {
if (scannedClasses.isEmpty()) {
throw new TypeConverterLoaderException("Cannot find any type converter classes from the following packages: " + Arrays.asList(packageNames));
}
- LOG.debug("Found " + packageNames.length + " packages with " + scannedClasses.size() + " @Converter classes to load");
+ LOG.debug("Found {} packages with {} @Converter classes to load", packageNames.length, scannedClasses.size());
classes.addAll(scannedClasses);
}
diff --git a/camel-core/src/main/java/org/apache/camel/main/MainSupport.java b/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
index 5456326..0c978a0 100644
--- a/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
+++ b/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
@@ -469,18 +469,18 @@ public abstract class MainSupport extends ServiceSupport {
try {
if (duration > 0) {
TimeUnit unit = getTimeUnit();
- LOG.info("Waiting for: " + duration + " " + unit);
+ LOG.info("Waiting for: {} {}", duration, unit);
latch.await(duration, unit);
exitCode.compareAndSet(UNINITIALIZED_EXIT_CODE, durationHitExitCode);
completed.set(true);
} else if (durationIdle > 0) {
TimeUnit unit = getTimeUnit();
- LOG.info("Waiting to be idle for: " + duration + " " + unit);
+ LOG.info("Waiting to be idle for: {} {}", duration, unit);
exitCode.compareAndSet(UNINITIALIZED_EXIT_CODE, durationHitExitCode);
latch.await();
completed.set(true);
} else if (durationMaxMessages > 0) {
- LOG.info("Waiting until: " + durationMaxMessages + " messages has been processed");
+ LOG.info("Waiting until: {} messages has been processed", durationMaxMessages);
exitCode.compareAndSet(UNINITIALIZED_EXIT_CODE, durationHitExitCode);
latch.await();
completed.set(true);
diff --git a/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java b/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java
index 896ad63..e4bf8c0 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java
@@ -196,7 +196,7 @@ public class ThroughputLogger extends ServiceSupport implements AsyncProcessor,
logSchedulerService = camelContext.getExecutorServiceManager().newSingleThreadScheduledExecutor(this, "ThroughputLogger");
Runnable scheduledLogTask = new ScheduledLogTask();
- LOG.info("Scheduling throughput log to run every " + groupInterval + " millis.");
+ LOG.info("Scheduling throughput log to run every {} millis.", groupInterval);
// must use fixed rate to have it trigger at every X interval
logSchedulerService.scheduleAtFixedRate(scheduledLogTask, groupDelay, groupInterval, TimeUnit.MILLISECONDS);
}
diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
index 4515fa3..1fe596e 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
@@ -1361,7 +1361,7 @@ public class AggregateProcessor extends ServiceSupport implements AsyncProcessor
// create a background recover thread to check every interval
recoverService = camelContext.getExecutorServiceManager().newScheduledThreadPool(this, "AggregateRecoverChecker", 1);
Runnable recoverTask = new RecoverTask(recoverable);
- LOG.info("Using RecoverableAggregationRepository by scheduling recover checker to run every " + interval + " millis.");
+ LOG.info("Using RecoverableAggregationRepository by scheduling recover checker to run every {} millis.", interval);
// use fixed delay so there is X interval between each run
recoverService.scheduleWithFixedDelay(recoverTask, 1000L, interval, TimeUnit.MILLISECONDS);
@@ -1370,7 +1370,7 @@ public class AggregateProcessor extends ServiceSupport implements AsyncProcessor
if (max <= 0) {
throw new IllegalArgumentException("Option maximumRedeliveries must be a positive number, was: " + max);
}
- LOG.info("After " + max + " failed redelivery attempts Exchanges will be moved to deadLetterUri: " + recoverable.getDeadLetterUri());
+ LOG.info("After {} failed redelivery attempts Exchanges will be moved to deadLetterUri: {}", max, recoverable.getDeadLetterUri());
// dead letter uri must be a valid endpoint
Endpoint endpoint = camelContext.getEndpoint(recoverable.getDeadLetterUri());
@@ -1386,7 +1386,7 @@ public class AggregateProcessor extends ServiceSupport implements AsyncProcessor
throw new IllegalArgumentException("Only one of completionInterval or completionTimeout can be used, not both.");
}
if (getCompletionInterval() > 0) {
- LOG.info("Using CompletionInterval to run every " + getCompletionInterval() + " millis.");
+ LOG.info("Using CompletionInterval to run every {} millis.", getCompletionInterval());
if (getTimeoutCheckerExecutorService() == null) {
setTimeoutCheckerExecutorService(camelContext.getExecutorServiceManager().newScheduledThreadPool(this, AGGREGATE_TIMEOUT_CHECKER, 1));
shutdownTimeoutCheckerExecutorService = true;
@@ -1397,7 +1397,7 @@ public class AggregateProcessor extends ServiceSupport implements AsyncProcessor
// start timeout service if its in use
if (getCompletionTimeout() > 0 || getCompletionTimeoutExpression() != null) {
- LOG.info("Using CompletionTimeout to trigger after " + getCompletionTimeout() + " millis of inactivity.");
+ LOG.info("Using CompletionTimeout to trigger after {} millis of inactivity.", getCompletionTimeout());
if (getTimeoutCheckerExecutorService() == null) {
setTimeoutCheckerExecutorService(camelContext.getExecutorServiceManager().newScheduledThreadPool(this, AGGREGATE_TIMEOUT_CHECKER, 1));
shutdownTimeoutCheckerExecutorService = true;
diff --git a/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultTraceEventHandler.java b/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultTraceEventHandler.java
index bcd45d8..405e266 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultTraceEventHandler.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultTraceEventHandler.java
@@ -89,7 +89,7 @@ public class DefaultTraceEventHandler implements TraceEventHandler, Service {
// should we use ordinary or jpa objects
if (tracer.isUseJpa()) {
if (LOG.isTraceEnabled()) {
- LOG.trace("Using class: " + this.jpaTraceEventMessageClassName + " for tracing event messages");
+ LOG.trace("Using class: {} for tracing event messages", this.jpaTraceEventMessageClassName);
}
// load the jpa event message class
diff --git a/camel-core/src/main/java/org/apache/camel/support/ReloadStrategySupport.java b/camel-core/src/main/java/org/apache/camel/support/ReloadStrategySupport.java
index 41d2600..37e4451 100644
--- a/camel-core/src/main/java/org/apache/camel/support/ReloadStrategySupport.java
+++ b/camel-core/src/main/java/org/apache/camel/support/ReloadStrategySupport.java
@@ -76,7 +76,7 @@ public abstract class ReloadStrategySupport extends ServiceSupport implements Re
dom = XmlLineNumberParser.parseXml(new ByteArrayInputStream(xml.getBytes()), null, "camelContext,routeContext,routes", "http://camel.apache.org/schema/spring");
} catch (Exception e) {
failed++;
- log.warn("Cannot load the resource " + name + " as XML");
+ log.warn("Cannot load the resource {} as XML", name);
return;
}
diff --git a/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodParser.java b/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodParser.java
index 73f71e6..783cbd2f 100644
--- a/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodParser.java
+++ b/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodParser.java
@@ -190,7 +190,7 @@ public abstract class ApiMethodParser<T> {
}
}
// duplicate methods???
- log.warn("Duplicate methods found [" + model1 + "], [" + model2 + "]");
+ log.warn("Duplicate methods found [{}], [{}]", model1, model2);
return 0;
}
}
diff --git a/camel-core/src/test/java/org/apache/camel/LanguageTestSupport.java b/camel-core/src/test/java/org/apache/camel/LanguageTestSupport.java
index 92ad5d1..f341dbb 100644
--- a/camel-core/src/test/java/org/apache/camel/LanguageTestSupport.java
+++ b/camel-core/src/test/java/org/apache/camel/LanguageTestSupport.java
@@ -95,7 +95,7 @@ public abstract class LanguageTestSupport extends ExchangeTestSupport {
value = expression.evaluate(exchange, Object.class);
}
- log.debug("Evaluated expression: " + expression + " on exchange: " + exchange + " result: " + value);
+ log.debug("Evaluated expression: {} on exchange: {} result: {}", expression, exchange, value);
return value;
}
diff --git a/camel-core/src/test/java/org/apache/camel/TestSupport.java b/camel-core/src/test/java/org/apache/camel/TestSupport.java
index 44acc58..3fb18fa 100644
--- a/camel-core/src/test/java/org/apache/camel/TestSupport.java
+++ b/camel-core/src/test/java/org/apache/camel/TestSupport.java
@@ -207,7 +207,7 @@ public abstract class TestSupport extends TestCase {
}
assertEquals("in body of: " + exchange, expected, actual);
- LOG.debug("Received response: " + exchange + " with in: " + exchange.getIn());
+ LOG.debug("Received response: {} with in: {}", exchange, exchange.getIn());
}
/**
@@ -229,7 +229,7 @@ public abstract class TestSupport extends TestCase {
}
assertEquals("output body of: " + exchange, expected, actual);
- LOG.debug("Received response: " + exchange + " with out: " + exchange.getOut());
+ LOG.debug("Received response: {} with out: {}", exchange, exchange.getOut());
}
public static Object assertMessageHeader(Message message, String name, Object expected) {
@@ -255,7 +255,7 @@ public abstract class TestSupport extends TestCase {
value = expression.evaluate(exchange, Object.class);
}
- LOG.debug("Evaluated expression: " + expression + " on exchange: " + exchange + " result: " + value);
+ LOG.debug("Evaluated expression: {} on exchange: {} result: {}", expression, exchange, value);
assertEquals("Expression: " + expression + " on Exchange: " + exchange, expected, value);
return value;
@@ -289,7 +289,7 @@ public abstract class TestSupport extends TestCase {
}
boolean value = predicate.matches(exchange);
- LOG.debug("Evaluated predicate: " + predicate + " on exchange: " + exchange + " result: " + value);
+ LOG.debug("Evaluated predicate: {} on exchange: {} result: {}", predicate, exchange, value);
assertEquals("Predicate: " + predicate + " on Exchange: " + exchange, expected, value);
return value;
diff --git a/camel-core/src/test/java/org/apache/camel/TestSupportJmxCleanup.java b/camel-core/src/test/java/org/apache/camel/TestSupportJmxCleanup.java
index 3cb898b..528bc72 100644
--- a/camel-core/src/test/java/org/apache/camel/TestSupportJmxCleanup.java
+++ b/camel-core/src/test/java/org/apache/camel/TestSupportJmxCleanup.java
@@ -46,7 +46,7 @@ public final class TestSupportJmxCleanup {
String d = getDomainName(domain);
Set<ObjectName> s = mbsc.queryNames(new ObjectName(d + ":*"), null);
if (s.size() > 0) {
- LOG.warn(" + " + s.size() + " ObjectNames registered in domain \"" + d + "\"");
+ LOG.warn(" + {} ObjectNames registered in domain \"{}\"", s.size(), d);
for (ObjectName on : s) {
LOG.warn(" | " + on);
}
diff --git a/camel-core/src/test/java/org/apache/camel/component/ComponentDiscoveryTest.java b/camel-core/src/test/java/org/apache/camel/component/ComponentDiscoveryTest.java
index 6138bcb..09fa527 100644
--- a/camel-core/src/test/java/org/apache/camel/component/ComponentDiscoveryTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/ComponentDiscoveryTest.java
@@ -53,7 +53,7 @@ public class ComponentDiscoveryTest {
Set<Map.Entry<String, Properties>> entries = map.entrySet();
for (Map.Entry<String, Properties> entry : entries) {
- LOG.info("Found component " + entry.getKey() + " with properties: " + entry.getValue());
+ LOG.info("Found component {} with properties: {}", entry.getKey(), entry.getValue());
}
}
diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java b/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java
index 84d3fde..6b8cb2a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java
@@ -154,7 +154,7 @@ public class BeanInfoTest extends TestCase {
ExchangePattern actualPattern = methodInfo.getPattern();
assertEquals("Pattern for: " + method, expectedPattern, actualPattern);
- LOG.info("Method: " + method + " has pattern: " + actualPattern);
+ LOG.info("Method: {} has pattern: {}", method, actualPattern);
}
public interface Foo {
diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvocationSerializeTest.java b/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvocationSerializeTest.java
index 3c9d5a7..78a45f4 100644
--- a/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvocationSerializeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvocationSerializeTest.java
@@ -60,7 +60,7 @@ public class BeanInvocationSerializeTest extends TestSupport {
}
public void cheese(String a, String b) {
- log.debug("Called with a: " + a + " b: " + b);
+ log.debug("Called with a: {} b: {}", a, b);
}
}
diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java b/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java
index 0ac4bb6..6d105d1 100644
--- a/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java
@@ -83,7 +83,7 @@ public class NewInstanceTest extends ContextTestSupport {
}
public int read(@Body String body) {
- LOG.info("read() method called with: " + body + " on " + this);
+ LOG.info("read() method called with: {} on {}", body, this);
return id;
}
}
diff --git a/camel-core/src/test/java/org/apache/camel/component/browse/BrowseTest.java b/camel-core/src/test/java/org/apache/camel/component/browse/BrowseTest.java
index 18026b8..4355a6f 100644
--- a/camel-core/src/test/java/org/apache/camel/component/browse/BrowseTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/browse/BrowseTest.java
@@ -44,7 +44,7 @@ public class BrowseTest extends ContextTestSupport {
for (Endpoint endpoint : list) {
List<Exchange> exchanges = ((BrowseEndpoint) endpoint).getExchanges();
- LOG.debug(">>>> " + endpoint + " has: " + exchanges);
+ LOG.debug(">>>> {} has: {}", endpoint, exchanges);
assertEquals("Exchanges received on " + endpoint, 2, exchanges.size());
assertInMessageBodyEquals(exchanges.get(0), body1);
diff --git a/camel-core/src/test/java/org/apache/camel/impl/ComponentConfigurationTest.java b/camel-core/src/test/java/org/apache/camel/impl/ComponentConfigurationTest.java
index 8b4ca09..4d1a80b 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/ComponentConfigurationTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/ComponentConfigurationTest.java
@@ -220,7 +220,7 @@ public class ComponentConfigurationTest {
assertEquals("foo", "xyz", endpoint.getFoo());
assertEquals("bar", 5, endpoint.getBar());
- LOG.info("Created endpoint " + endpoint + " on URI " + endpoint.getEndpointUri());
+ LOG.info("Created endpoint {} on URI {}", endpoint, endpoint.getEndpointUri());
// lets try configure a parameter
configuration.setEndpointParameter(endpoint, "bar", 6);
diff --git a/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java b/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java
index 9e0becb..6c7e117 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java
@@ -118,7 +118,7 @@ public class CustomIdFactoryTest extends ContextTestSupport {
return new DelegateProcessor(target) {
@Override
protected void processNext(Exchange exchange) throws Exception {
- LOG.debug("Debugging at: " + definition.toString() + " with id: " + definition.getId() + " with exchange: " + exchange);
+ LOG.debug("Debugging at: {} with id: {} with exchange: {}", definition.toString(), definition.getId(), exchange);
// record the path taken at runtime
ids += definition.getId();
diff --git a/camel-core/src/test/java/org/apache/camel/issues/TypeConverterConcurrencyIssueTest.java b/camel-core/src/test/java/org/apache/camel/issues/TypeConverterConcurrencyIssueTest.java
index 974fac7..52c8c46 100644
--- a/camel-core/src/test/java/org/apache/camel/issues/TypeConverterConcurrencyIssueTest.java
+++ b/camel-core/src/test/java/org/apache/camel/issues/TypeConverterConcurrencyIssueTest.java
@@ -59,7 +59,7 @@ public class TypeConverterConcurrencyIssueTest extends ContextTestSupport {
}
assertTrue("The expected mandatory conversions failed!", latch.await(1, TimeUnit.MINUTES));
- log.info("Took " + watch.taken() + " millis to convert " + size + " objects");
+ log.info("Took {} millis to convert {} objects", watch.taken(), size);
}
public static MyCamelBean toMyCamelBean(String body) {
diff --git a/camel-core/src/test/java/org/apache/camel/language/TokenPairIteratorSplitChoicePerformanceTest.java b/camel-core/src/test/java/org/apache/camel/language/TokenPairIteratorSplitChoicePerformanceTest.java
index 321a75b..a999135 100644
--- a/camel-core/src/test/java/org/apache/camel/language/TokenPairIteratorSplitChoicePerformanceTest.java
+++ b/camel-core/src/test/java/org/apache/camel/language/TokenPairIteratorSplitChoicePerformanceTest.java
@@ -58,7 +58,7 @@ public class TokenPairIteratorSplitChoicePerformanceTest extends ContextTestSupp
NotifyBuilder notify = new NotifyBuilder(context).whenDone(size).create();
boolean matches = notify.matches(5, TimeUnit.MINUTES);
- log.info("Processed file with " + size + " elements in: " + TimeUtils.printDuration(watch.taken()));
+ log.info("Processed file with {} elements in: {}", size, TimeUtils.printDuration(watch.taken()));
log.info("Processed " + tiny.get() + " tiny messages");
log.info("Processed " + small.get() + " small messages");
@@ -108,7 +108,7 @@ public class TokenPairIteratorSplitChoicePerformanceTest extends ContextTestSupp
int num = small.incrementAndGet();
if (num % 100 == 0) {
- log.info("Processed " + num + " small messages: " + xml);
+ log.info("Processed {} small messages: {}", num, xml);
log.debug(xml);
}
}
diff --git a/camel-core/src/test/java/org/apache/camel/language/XPathRouteConcurrentBigTest.java b/camel-core/src/test/java/org/apache/camel/language/XPathRouteConcurrentBigTest.java
index 9638d2e..72293c0 100644
--- a/camel-core/src/test/java/org/apache/camel/language/XPathRouteConcurrentBigTest.java
+++ b/camel-core/src/test/java/org/apache/camel/language/XPathRouteConcurrentBigTest.java
@@ -79,11 +79,11 @@ public class XPathRouteConcurrentBigTest extends ContextTestSupport {
}
}
- LOG.info("Sent " + messageCount + " messages in " + (System.currentTimeMillis() - now) + " ms");
+ LOG.info("Sent {} messages in {} ms", messageCount, (System.currentTimeMillis() - now));
assertMockEndpointsSatisfied();
- LOG.info("Processed " + messageCount + " messages in " + (System.currentTimeMillis() - now) + " ms");
+ LOG.info("Processed {} messages in {} ms", messageCount, (System.currentTimeMillis() - now));
}
@Override
diff --git a/camel-core/src/test/java/org/apache/camel/language/XPathSplitChoicePerformanceTest.java b/camel-core/src/test/java/org/apache/camel/language/XPathSplitChoicePerformanceTest.java
index dd28ef6..0de4da4 100644
--- a/camel-core/src/test/java/org/apache/camel/language/XPathSplitChoicePerformanceTest.java
+++ b/camel-core/src/test/java/org/apache/camel/language/XPathSplitChoicePerformanceTest.java
@@ -58,7 +58,7 @@ public class XPathSplitChoicePerformanceTest extends ContextTestSupport {
NotifyBuilder notify = new NotifyBuilder(context).whenDone(size).create();
boolean matches = notify.matches(60, TimeUnit.SECONDS);
- log.info("Processed file with " + size + " elements in: " + TimeUtils.printDuration(watch.taken()));
+ log.info("Processed file with {} elements in: {}", size, TimeUtils.printDuration(watch.taken()));
log.info("Processed " + tiny.get() + " tiny messages");
log.info("Processed " + small.get() + " small messages");
diff --git a/camel-core/src/test/java/org/apache/camel/management/EndpointCompletionTest.java b/camel-core/src/test/java/org/apache/camel/management/EndpointCompletionTest.java
index bec8dfa..8d5151b 100644
--- a/camel-core/src/test/java/org/apache/camel/management/EndpointCompletionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/EndpointCompletionTest.java
@@ -79,7 +79,7 @@ public class EndpointCompletionTest extends ManagementTestSupport {
List<?> completions = assertIsInstanceOf(List.class,
mbeanServer.invoke(on, "completeEndpointPath", params, signature));
- LOG.info("Component " + componentName + " with '" + completionText + "' Returned: " + completions);
+ LOG.info("Component {} with '{}' Returned: {}", componentName, completionText, completions);
return (List<String>) completions;
}
@@ -90,7 +90,7 @@ public class EndpointCompletionTest extends ManagementTestSupport {
String answer = assertIsInstanceOf(String.class,
mbeanServer.invoke(on, "componentParameterJsonSchema", params, signature));
- LOG.info("Component " + componentName + " returned JSON: " + answer);
+ LOG.info("Component {} returned JSON: {}", componentName, answer);
// now lets validate that the generated JSON parses correctly
ObjectMapper mapper = new ObjectMapper();
diff --git a/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java b/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java
index 118e8d2..1426b72 100644
--- a/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java
+++ b/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java
@@ -371,14 +371,14 @@ public class XmlParseTest extends XmlTestSupport {
ProcessorDefinition<?> processor = assertOneElement(route.getOutputs());
ToDefinition value = assertIsInstanceOf(ToDefinition.class, processor);
String text = message + "To URI";
- log.info("Testing: " + text + " is equal to: " + uri + " for processor: " + processor);
+ log.info("Testing: {} is equal to: {} for processor: {}", text, uri, processor);
assertEquals(text, uri, value.getUri());
}
protected void assertTo(String message, ProcessorDefinition<?> processor, String uri) {
ToDefinition value = assertIsInstanceOf(ToDefinition.class, processor);
String text = message + "To URI";
- log.info("Testing: " + text + " is equal to: " + uri + " for processor: " + processor);
+ log.info("Testing: {} is equal to: {} for processor: {}", text, uri, processor);
assertEquals(text, uri, value.getUri());
}
diff --git a/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTest.java b/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTest.java
index 67a7c69..39bb3c9 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTest.java
@@ -85,7 +85,7 @@ public class BeanRecipientListTest extends ContextTestSupport {
@org.apache.camel.RecipientList
public String[] route(String body) {
- LOG.debug("Called " + this + " with body: " + body);
+ LOG.debug("Called {} with body: {}", this, body);
return new String[] {"mock:a", "mock:b"};
}
}
diff --git a/camel-core/src/test/java/org/apache/camel/processor/BeanRouteTest.java b/camel-core/src/test/java/org/apache/camel/processor/BeanRouteTest.java
index af20075..bf2a203 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/BeanRouteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/BeanRouteTest.java
@@ -95,7 +95,7 @@ public class BeanRouteTest extends ContextTestSupport {
public void read(String body) {
this.body = body;
- LOG.info("read() method on " + this + " with body: " + body);
+ LOG.info("read() method on {} with body: {}", this, body);
}
public void wrongMethod(String body) {
diff --git a/camel-core/src/test/java/org/apache/camel/processor/MyLoggingSentEventNotifer.java b/camel-core/src/test/java/org/apache/camel/processor/MyLoggingSentEventNotifer.java
index 7103d94..994ac55 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/MyLoggingSentEventNotifer.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/MyLoggingSentEventNotifer.java
@@ -31,7 +31,7 @@ public class MyLoggingSentEventNotifer extends EventNotifierSupport {
if (event instanceof ExchangeSentEvent) {
ExchangeSentEvent sent = (ExchangeSentEvent) event;
- log.info("Took " + sent.getTimeTaken() + " millis to send to: " + sent.getEndpoint());
+ log.info("Took {} millis to send to: {}", sent.getTimeTaken(), sent.getEndpoint());
}
}
diff --git a/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerBlockedDelayTest.java b/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerBlockedDelayTest.java
index 3742a03..b73351d 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerBlockedDelayTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerBlockedDelayTest.java
@@ -61,7 +61,7 @@ public class RedeliveryErrorHandlerBlockedDelayTest extends ContextTestSupport {
.to("mock:before")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
- LOG.info("Processing at attempt " + attempt + " " + exchange);
+ LOG.info("Processing at attempt {} {}", attempt, exchange);
String body = exchange.getIn().getBody(String.class);
if (body.contains("World")) {
@@ -72,7 +72,7 @@ public class RedeliveryErrorHandlerBlockedDelayTest extends ContextTestSupport {
}
exchange.getIn().setBody("Hello " + body);
- LOG.info("Processing at attempt " + attempt + " complete " + exchange);
+ LOG.info("Processing at attempt {} complete {}", attempt, exchange);
}
})
.to("log:after")
diff --git a/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerNonBlockedDelayTest.java b/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerNonBlockedDelayTest.java
index b199616..8a849f9 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerNonBlockedDelayTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerNonBlockedDelayTest.java
@@ -60,7 +60,7 @@ public class RedeliveryErrorHandlerNonBlockedDelayTest extends ContextTestSuppor
.to("mock:before")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
- LOG.info("Processing at attempt " + attempt + " " + exchange);
+ LOG.info("Processing at attempt {} {}", attempt, exchange);
String body = exchange.getIn().getBody(String.class);
if (body.contains("World")) {
@@ -71,7 +71,7 @@ public class RedeliveryErrorHandlerNonBlockedDelayTest extends ContextTestSuppor
}
exchange.getIn().setBody("Hello " + body);
- LOG.info("Processing at attempt " + attempt + " complete " + exchange);
+ LOG.info("Processing at attempt {} complete {}", attempt, exchange);
}
})
.to("log:after")
diff --git a/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerNonBlockedRedeliveryHeaderTest.java b/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerNonBlockedRedeliveryHeaderTest.java
index 98d7521..7f1df48 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerNonBlockedRedeliveryHeaderTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerNonBlockedRedeliveryHeaderTest.java
@@ -61,7 +61,7 @@ public class RedeliveryErrorHandlerNonBlockedRedeliveryHeaderTest extends Contex
.to("mock:before")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
- LOG.info("Processing at attempt " + attempt + " " + exchange);
+ LOG.info("Processing at attempt {} {}", attempt, exchange);
String body = exchange.getIn().getBody(String.class);
if (body.contains("World")) {
@@ -72,7 +72,7 @@ public class RedeliveryErrorHandlerNonBlockedRedeliveryHeaderTest extends Contex
}
exchange.getIn().setBody("Hello " + body);
- LOG.info("Processing at attempt " + attempt + " complete " + exchange);
+ LOG.info("Processing at attempt {} complete {}", attempt, exchange);
}
})
.to("log:after")
diff --git a/camel-core/src/test/java/org/apache/camel/processor/RedeliveryOnExceptionBlockedDelayTest.java b/camel-core/src/test/java/org/apache/camel/processor/RedeliveryOnExceptionBlockedDelayTest.java
index 7d2b173..5dcc1c5 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/RedeliveryOnExceptionBlockedDelayTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/RedeliveryOnExceptionBlockedDelayTest.java
@@ -61,7 +61,7 @@ public class RedeliveryOnExceptionBlockedDelayTest extends ContextTestSupport {
.to("mock:before")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
- LOG.info("Processing at attempt " + attempt + " " + exchange);
+ LOG.info("Processing at attempt {} {}", attempt, exchange);
String body = exchange.getIn().getBody(String.class);
if (body.contains("World")) {
@@ -72,7 +72,7 @@ public class RedeliveryOnExceptionBlockedDelayTest extends ContextTestSupport {
}
exchange.getIn().setBody("Hello " + body);
- LOG.info("Processing at attempt " + attempt + " complete " + exchange);
+ LOG.info("Processing at attempt {} complete {}", attempt, exchange);
}
})
.to("log:after")
diff --git a/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceCountTest.java b/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceCountTest.java
index d5a4a1d..2eb9621 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceCountTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceCountTest.java
@@ -42,7 +42,7 @@ public class RoutePerformanceCountTest extends ContextTestSupport {
assertEquals(size, processor.getCounter());
long delta = System.currentTimeMillis() - start;
- log.info("RoutePerformanceCountTest: Sent: " + size + " Took: " + delta + " ms");
+ log.info("RoutePerformanceCountTest: Sent: {} Took: {} ms", size, delta);
}
@Override
diff --git a/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceTest.java b/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceTest.java
index a41e235..1500961 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceTest.java
@@ -48,7 +48,7 @@ public class RoutePerformanceTest extends ContextTestSupport {
// wait 30 sec for slow servers
MockEndpoint.assertIsSatisfied(context, 30, TimeUnit.SECONDS);
- log.info("RoutePerformanceTest: Sent: " + size + " Took: " + watch.taken() + " ms");
+ log.info("RoutePerformanceTest: Sent: {} Took: {} ms", size, watch.taken());
}
@Override
diff --git a/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorConcurrencyTest.java b/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorConcurrencyTest.java
index c53de86..8d01e44 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorConcurrencyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorConcurrencyTest.java
@@ -89,7 +89,7 @@ public class AggregatorConcurrencyTest extends ContextTestSupport {
int total = SUM.addAndGet(newIndex);
answer.getIn().setHeader("total", total);
- LOG.debug("Index: " + newIndex + ". Total so far: " + total);
+ LOG.debug("Index: {}. Total so far: {}", newIndex, total);
return answer;
}
}).completionTimeout(60000).completionPredicate(property(Exchange.AGGREGATED_SIZE).isEqualTo(100))
diff --git a/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRedeliveryErrorHandlerNonBlockedDelay2Test.java b/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRedeliveryErrorHandlerNonBlockedDelay2Test.java
index 2515b68..3f2347b 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRedeliveryErrorHandlerNonBlockedDelay2Test.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRedeliveryErrorHandlerNonBlockedDelay2Test.java
@@ -69,7 +69,7 @@ public class AsyncEndpointRedeliveryErrorHandlerNonBlockedDelay2Test extends Con
.to("async:camel")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
- LOG.info("Processing at attempt " + attempt + " " + exchange);
+ LOG.info("Processing at attempt {} {}", attempt, exchange);
String body = exchange.getIn().getBody(String.class);
if (body.contains("Camel")) {
@@ -80,7 +80,7 @@ public class AsyncEndpointRedeliveryErrorHandlerNonBlockedDelay2Test extends Con
}
exchange.getIn().setBody("Hello " + body);
- LOG.info("Processing at attempt " + attempt + " complete " + exchange);
+ LOG.info("Processing at attempt {} complete {}", attempt, exchange);
}
})
.to("log:after")
diff --git a/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRedeliveryErrorHandlerNonBlockedDelayTest.java b/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRedeliveryErrorHandlerNonBlockedDelayTest.java
index 0b9383d..4ec9ac6 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRedeliveryErrorHandlerNonBlockedDelayTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRedeliveryErrorHandlerNonBlockedDelayTest.java
@@ -64,7 +64,7 @@ public class AsyncEndpointRedeliveryErrorHandlerNonBlockedDelayTest extends Cont
.to("mock:before")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
- LOG.info("Processing at attempt " + attempt + " " + exchange);
+ LOG.info("Processing at attempt {} {}", attempt, exchange);
String body = exchange.getIn().getBody(String.class);
if (body.contains("World")) {
@@ -75,7 +75,7 @@ public class AsyncEndpointRedeliveryErrorHandlerNonBlockedDelayTest extends Cont
}
exchange.getIn().setBody("Hello " + body);
- LOG.info("Processing at attempt " + attempt + " complete " + exchange);
+ LOG.info("Processing at attempt {} complete {}", attempt, exchange);
}
})
.to("log:after")
--
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].