Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
 Fri Mar 25 22:34:26 2011
@@ -204,9 +204,7 @@ public class AggregateProcessor extends 
      * @throws org.apache.camel.CamelExchangeException is thrown if error 
aggregating
      */
     private Exchange doAggregation(String key, Exchange exchange) throws 
CamelExchangeException {
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("onAggregation +++ start +++ with correlation key: " + 
key);
-        }
+        LOG.trace("onAggregation +++ start +++ with correlation key: {}", key);
 
         Exchange answer;
         Exchange oldExchange = 
aggregationRepository.get(exchange.getContext(), key);
@@ -245,9 +243,7 @@ public class AggregateProcessor extends 
 
         // only need to update aggregation repository if we are not complete
         if (complete == null) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("In progress aggregated exchange: " + answer + " 
with correlation key:" + key);
-            }
+            LOG.trace("In progress aggregated exchange: {} with correlation 
key: {}", answer, key);
             aggregationRepository.add(exchange.getContext(), key, answer);
         } else {
             // if batch consumer completion is enabled then we need to 
complete the group
@@ -274,9 +270,7 @@ public class AggregateProcessor extends 
             }
         }
 
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("onAggregation +++  end  +++ with correlation key: " + 
key);
-        }
+        LOG.trace("onAggregation +++  end  +++ with correlation key: {}", key);
 
         return answer;
     }
@@ -318,20 +312,16 @@ public class AggregateProcessor extends 
         if (getCompletionTimeoutExpression() != null) {
             Long value = getCompletionTimeoutExpression().evaluate(exchange, 
Long.class);
             if (value != null && value > 0) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Updating correlation key " + key + " to timeout 
after "
-                            + value + " ms. as exchange received: " + 
exchange);
-                }
+                LOG.trace("Updating correlation key {} to timeout after {} ms. 
as exchange received: {}",
+                        new Object[]{key, value, exchange});
                 timeoutMap.put(key, exchange.getExchangeId(), value);
                 timeoutSet = true;
             }
         }
         if (!timeoutSet && getCompletionTimeout() > 0) {
             // timeout is used so use the timeout map to keep an eye on this
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Updating correlation key " + key + " to timeout 
after "
-                        + getCompletionTimeout() + " ms. as exchange received: 
" + exchange);
-            }
+            LOG.trace("Updating correlation key {} to timeout after {} ms. as 
exchange received: {}",
+                    new Object[]{key, getCompletionTimeout(), exchange});
             timeoutMap.put(key, exchange.getExchangeId(), 
getCompletionTimeout());
         }
 
@@ -413,9 +403,7 @@ public class AggregateProcessor extends 
                     // if there was an exception then let the exception 
handler handle it
                     getExceptionHandler().handleException("Error processing 
aggregated exchange", exchange, exchange.getException());
                 } else {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("Processing aggregated exchange: " + 
exchange + " complete.");
-                    }
+                    LOG.trace("Processing aggregated exchange: {} complete.", 
exchange);
                 }
             }
         });
@@ -545,9 +533,7 @@ public class AggregateProcessor extends 
         }
 
         public void onFailure(Exchange exchange) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Aggregated exchange onFailure: " + exchange);
-            }
+            LOG.trace("Aggregated exchange onFailure: {}", exchange);
 
             // must remember to remove in progress when we failed
             inProgressCompleteExchanges.remove(exchangeId);
@@ -555,9 +541,7 @@ public class AggregateProcessor extends 
         }
 
         public void onComplete(Exchange exchange) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Aggregated exchange onComplete: " + exchange);
-            }
+            LOG.trace("Aggregated exchange onComplete: {}", exchange);
 
             // only confirm if we processed without a problem
             try {
@@ -605,9 +589,7 @@ public class AggregateProcessor extends 
 
             boolean inProgress = 
inProgressCompleteExchanges.contains(exchangeId);
             if (inProgress) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Aggregated exchange with id: " + exchangeId + " 
is already in progress.");
-                }
+                LOG.trace("Aggregated exchange with id: {} is already in 
progress.", exchangeId);
                 return true;
             }
 
@@ -630,9 +612,7 @@ public class AggregateProcessor extends 
         public void run() {
             // only run if CamelContext has been fully started
             if (!camelContext.getStatus().isStarted()) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Completion interval task cannot start due 
CamelContext(" + camelContext.getName() + ") has not been started yet");
-                }
+                LOG.trace("Completion interval task cannot start due 
CamelContext({}) has not been started yet", camelContext.getName());
                 return;
             }
 
@@ -648,9 +628,7 @@ public class AggregateProcessor extends 
                     for (String key : keys) {
                         Exchange exchange = 
aggregationRepository.get(camelContext, key);
                         if (exchange != null) {
-                            if (LOG.isTraceEnabled()) {
-                                LOG.trace("Completion interval triggered for 
correlation key: " + key);
-                            }
+                            LOG.trace("Completion interval triggered for 
correlation key: {}", key);
                             // indicate it was completed by interval
                             
exchange.setProperty(Exchange.AGGREGATED_COMPLETED_BY, "interval");
                             onCompletion(key, exchange, false);
@@ -678,9 +656,7 @@ public class AggregateProcessor extends 
         public void run() {
             // only run if CamelContext has been fully started
             if (!camelContext.getStatus().isStarted()) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Recover check cannot start due CamelContext(" + 
camelContext.getName() + ") has not been started yet");
-                }
+                LOG.trace("Recover check cannot start due CamelContext({}) has 
not been started yet", camelContext.getName());
                 return;
             }
 
@@ -697,9 +673,7 @@ public class AggregateProcessor extends 
 
                 boolean inProgress = 
inProgressCompleteExchanges.contains(exchangeId);
                 if (inProgress) {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("Aggregated exchange with id: " + exchangeId 
+ " is already in progress.");
-                    }
+                    LOG.trace("Aggregated exchange with id: {} is already in 
progress.", exchangeId);
                 } else {
                     if (LOG.isDebugEnabled()) {
                         LOG.debug("Loading aggregated exchange with id: " + 
exchangeId + " to be recovered.");

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategy.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategy.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategy.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategy.java
 Fri Mar 25 22:34:26 2011
@@ -85,9 +85,7 @@ public class DefaultExceptionPolicyStrat
         }
 
         // now go through the candidates and find the best
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Found " + candidates.size() + " candidates");
-        }
+        LOG.trace("Found {} candidates", candidates.size());
 
         if (candidates.isEmpty()) {
             // no type found
@@ -118,7 +116,7 @@ public class DefaultExceptionPolicyStrat
                                                Exchange exchange, Throwable 
exception,
                                                Map<Integer, 
OnExceptionDefinition> candidates) {
         if (LOG.isTraceEnabled()) {
-            LOG.trace("Finding best suited exception policy for thrown 
exception " + exception.getClass().getName());
+            LOG.trace("Finding best suited exception policy for thrown 
exception {}", exception.getClass().getName());
         }
 
         // the goal is to find the exception with the same/closet inheritance 
level as the target exception being thrown
@@ -141,7 +139,7 @@ public class DefaultExceptionPolicyStrat
                 RouteDefinition typeRoute = 
ProcessorDefinitionHelper.getRoute(type);
                 if (route != null && typeRoute != null && route != typeRoute) {
                     if (LOG.isTraceEnabled()) {
-                        LOG.trace("The type is scoped for route: " + 
typeRoute.getId() + " however Exchange is at route: " + route.getId());
+                        LOG.trace("The type is scoped for route: {} however 
Exchange is at route: {}", typeRoute.getId(), route.getId());
                     }
                     continue;
                 }
@@ -151,9 +149,7 @@ public class DefaultExceptionPolicyStrat
 
                 // must match
                 if (!matchesWhen(type, exchange)) {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("The type did not match when: " + type);
-                    }
+                    LOG.trace("The type did not match when: {}", type);
                     continue;
                 }
 
@@ -179,16 +175,14 @@ public class DefaultExceptionPolicyStrat
         if (candidate != null) {
             if (!candidates.containsKey(candidateDiff)) {
                 // only add as candidate if we do not already have it 
registered with that level
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Adding " + candidate + " as candidate at level 
" + candidateDiff);
-                }
+                LOG.trace("Adding {} as candidate at level {}", candidate, 
candidateDiff);
                 candidates.put(candidateDiff, candidate);
             } else {
                 // we have an existing candidate already which we should 
prefer to use
                 // for example we check route scope before context scope 
(preferring route scopes)
                 if (LOG.isTraceEnabled()) {
-                    LOG.trace("Existing candidate " + 
candidates.get(candidateDiff)
-                        + " takes precedence over " + candidate + " at level " 
+ candidateDiff);
+                    LOG.trace("Existing candidate {} takes precedence over{} 
at level {}",
+                            new Object[]{candidates.get(candidateDiff), 
candidate, candidateDiff});
                 }
             }
         }
@@ -196,7 +190,7 @@ public class DefaultExceptionPolicyStrat
         // if we found a exact match then we should stop continue looking
         boolean exactMatch = candidateDiff == 0;
         if (LOG.isTraceEnabled() && exactMatch) {
-            LOG.trace("Exact match found for candidate: " + candidate);
+            LOG.trace("Exact match found for candidate: {}", candidate);
         }
         return exactMatch;
     }

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/idempotent/FileIdempotentRepository.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/idempotent/FileIdempotentRepository.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/idempotent/FileIdempotentRepository.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/idempotent/FileIdempotentRepository.java
 Fri Mar 25 22:34:26 2011
@@ -271,9 +271,7 @@ public class FileIdempotentRepository ex
      * Loads the given file store into the 1st level cache
      */
     protected void loadStore() {
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Loading to 1st level cache from idempotent filestore: " 
+ fileStore);
-        }
+        LOG.trace("Loading to 1st level cache from idempotent filestore: {}", 
fileStore);
 
         if (!fileStore.exists()) {
             return;

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
 Fri Mar 25 22:34:26 2011
@@ -144,9 +144,7 @@ public class TraceInterceptor extends De
                         traced.addTraced(new DefaultRouteNode(node, 
super.getProcessor()));
                     }
                 } else {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("Cannot trace as this Exchange does not have 
an UnitOfWork: " + exchange);
-                    }
+                    LOG.trace("Cannot trace as this Exchange does not have an 
UnitOfWork: {}", exchange);
                 }
             }
 

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/FailOverLoadBalancer.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/FailOverLoadBalancer.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/FailOverLoadBalancer.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/FailOverLoadBalancer.java
 Fri Mar 25 22:34:26 2011
@@ -103,9 +103,7 @@ public class FailOverLoadBalancer extend
             }
         }
 
-        if (log.isTraceEnabled()) {
-            log.trace("Should failover: " + answer + " for exchangeId: " + 
exchange.getExchangeId());
-        }
+        log.trace("Should failover: {} for exchangeId: {}", answer, 
exchange.getExchangeId());
 
         return answer;
     }
@@ -124,9 +122,7 @@ public class FailOverLoadBalancer extend
             }
             index.set(counter.get());
         }
-        if (log.isTraceEnabled()) {
-            log.trace("Failover starting with endpoint index " + index);
-        }
+        log.trace("Failover starting with endpoint index {}", index);
 
         while (first || shouldFailOver(exchange)) {
             if (!first) {
@@ -168,17 +164,13 @@ public class FailOverLoadBalancer extend
 
             // continue as long its being processed synchronously
             if (!sync) {
-                if (log.isTraceEnabled()) {
-                    log.trace("Processing exchangeId: " + 
exchange.getExchangeId() + " is continued being processed asynchronously");
-                }
+                log.trace("Processing exchangeId: {} is continued being 
processed asynchronously", exchange.getExchangeId());
                 // the remainder of the failover will be completed async
                 // so we break out now, then the callback will be invoked 
which then continue routing from where we left here
                 return false;
             }
 
-            if (log.isTraceEnabled()) {
-                log.trace("Processing exchangeId: " + exchange.getExchangeId() 
+ " is continued being processed synchronously");
-            }
+            log.trace("Processing exchangeId: {} is continued being processed 
synchronously", exchange.getExchangeId());
         }
 
         if (log.isDebugEnabled()) {
@@ -256,9 +248,7 @@ public class FailOverLoadBalancer extend
                 attempts.incrementAndGet();
                 // are we exhausted by attempts?
                 if (maximumFailoverAttempts > -1 && attempts.get() > 
maximumFailoverAttempts) {
-                    if (log.isTraceEnabled()) {
-                        log.trace("Breaking out of failover after " + attempts 
+ " failover attempts");
-                    }
+                    log.trace("Breaking out of failover after {} failover 
attempts", attempts);
                     break;
                 }
 
@@ -285,9 +275,7 @@ public class FailOverLoadBalancer extend
                 // try to failover using the next processor
                 doneSync = processExchange(processor, exchange, attempts, 
index, callback, processors);
                 if (!doneSync) {
-                    if (log.isTraceEnabled()) {
-                        log.trace("Processing exchangeId: " + 
exchange.getExchangeId() + " is continued being processed asynchronously");
-                    }
+                    log.trace("Processing exchangeId: {} is continued being 
processed asynchronously", exchange.getExchangeId());
                     // the remainder of the failover will be completed async
                     // so we break out now, then the callback will be invoked 
which then continue routing from where we left here
                     return;

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/AsyncProcessorHelper.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/AsyncProcessorHelper.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/AsyncProcessorHelper.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/AsyncProcessorHelper.java
 Fri Mar 25 22:34:26 2011
@@ -55,9 +55,7 @@ public final class AsyncProcessorHelper 
 
         if (exchange.isTransacted()) {
             // must be synchronized for transacted exchanges
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Transacted Exchange must be routed synchronously 
for exchangeId: " + exchange.getExchangeId() + " -> " + exchange);
-            }
+            LOG.trace("Transacted Exchange must be routed synchronously for 
exchangeId: {} -> {}", exchange.getExchangeId(), exchange);
             try {
                 process(processor, exchange);
             } catch (Throwable e) {
@@ -83,8 +81,8 @@ public final class AsyncProcessorHelper 
         }
 
         if (LOG.isTraceEnabled()) {
-            LOG.trace("Exchange processed and is continued routed " + (sync ? 
"synchronously" : "asynchronously")
-                + " for exchangeId: " + exchange.getExchangeId() + " -> " + 
exchange);
+            LOG.trace("Exchange processed and is continued routed {} for 
exchangeId: {} -> {}",
+                    new Object[]{sync ? "synchronously" : "asynchronously", 
exchange.getExchangeId(), exchange});
         }
         return sync;
     }
@@ -103,9 +101,7 @@ public final class AsyncProcessorHelper 
         boolean sync = processor.process(exchange, new AsyncCallback() {
             public void done(boolean doneSync) {
                 if (!doneSync) {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("Asynchronous callback received for 
exchangeId: " + exchange.getExchangeId());
-                    }
+                    LOG.trace("Asynchronous callback received for exchangeId: 
{}", exchange.getExchangeId());
                     latch.countDown();
                 }
             }
@@ -116,13 +112,11 @@ public final class AsyncProcessorHelper 
             }
         });
         if (!sync) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Waiting for asynchronous callback before continuing 
for exchangeId: " + exchange.getExchangeId() + " -> " + exchange);
-            }
+            LOG.trace("Waiting for asynchronous callback before continuing for 
exchangeId: {} -> {}",
+                    exchange.getExchangeId(), exchange);
             latch.await();
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Asynchronous callback received, will continue 
routing exchangeId: " + exchange.getExchangeId() + " -> " + exchange);
-            }
+            LOG.trace("Asynchronous callback received, will continue routing 
exchangeId: {} -> {}",
+                    exchange.getExchangeId(), exchange);
         }
     }
 

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/DefaultTimeoutMap.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/DefaultTimeoutMap.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/DefaultTimeoutMap.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/DefaultTimeoutMap.java
 Fri Mar 25 22:34:26 2011
@@ -163,9 +163,7 @@ public class DefaultTimeoutMap<K, V> ext
     }
 
     public void purge() {
-        if (log.isTraceEnabled()) {
-            log.trace("There are " + map.size() + " in the timeout map");
-        }
+        log.trace("There are {} in the timeout map", map.size());
         long now = currentTime();
 
         List<TimeoutMapEntry<K, V>> expired = new ArrayList<TimeoutMapEntry<K, 
V>>();

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/EventHelper.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/EventHelper.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/EventHelper.java 
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/EventHelper.java 
Fri Mar 25 22:34:26 2011
@@ -570,9 +570,7 @@ public final class EventHelper {
         }
 
         if (!notifier.isEnabled(event)) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Notification of event is disabled: " + event);
-            }
+            LOG.trace("Notification of event is disabled: {}", event);
             return;
         }
 

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java
 Fri Mar 25 22:34:26 2011
@@ -330,8 +330,8 @@ public final class IntrospectionSupport 
                         typeConvertionFailed = e;
                     }
                     if (LOG.isTraceEnabled()) {
-                        LOG.trace("Setter \"" + setter + "\" with parameter 
type \""
-                                  + setter.getParameterTypes()[0] + "\" could 
not be used for type conversions of " + value);
+                        LOG.trace("Setter \"{}\" with parameter type \"{}\" 
could not be used for type conversions of {}",
+                                new Object[]{setter, 
setter.getParameterTypes()[0], value});
                     }
                 }
             }
@@ -412,15 +412,11 @@ public final class IntrospectionSupport 
             return candidates;
         } else {
             // find the best match if possible
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Found " + candidates.size() + " suitable setter 
methods for setting " + name);
-            }
+            LOG.trace("Found {} suitable setter methods for setting {}", 
candidates.size(), name);
             // prefer to use the one with the same instance if any exists
             for (Method method : candidates) {                               
                 if (method.getParameterTypes()[0].isInstance(value)) {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("Method " + method + " is the best candidate 
as it has parameter with same instance type");
-                    }
+                    LOG.trace("Method {} is the best candidate as it has 
parameter with same instance type", method);
                     // retain only this method in the answer
                     candidates.clear();
                     candidates.add(method);

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java 
(original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java 
Fri Mar 25 22:34:26 2011
@@ -757,9 +757,7 @@ public final class ObjectHelper {
             return null;
         }
         try {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Loading class: " + name + " using classloader: " + 
loader);
-            }
+            LOG.trace("Loading class: {} using classloader: {}", name, loader);
             return loader.loadClass(name);
         } catch (ClassNotFoundException e) {
             if (LOG.isTraceEnabled()) {

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java 
(original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java 
Fri Mar 25 22:34:26 2011
@@ -47,16 +47,12 @@ public final class ServiceHelper {
     public static void startService(Object value) throws Exception {
         if (isStarted(value)) {
             // only start service if not already started
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Service already started: " + value);
-            }
+            LOG.trace("Service already started: {}", value);
             return;
         }
         if (value instanceof Service) {
             Service service = (Service)value;
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Starting service: " + service);
-            }
+            LOG.trace("Starting service: {}", service);
             service.start();
         } else if (value instanceof Collection) {
             startServices((Collection<?>)value);
@@ -104,16 +100,12 @@ public final class ServiceHelper {
     public static void stopService(Object value) throws Exception {
         if (isStopped(value)) {
             // only stop service if not already stopped
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Service already stopped: " + value);
-            }
+            LOG.trace("Service already stopped: {}", value);
             return;
         }
         if (value instanceof Service) {
             Service service = (Service)value;
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Stopping service " + value);
-            }
+            LOG.trace("Stopping service {}", value);
             service.stop();
         } else if (value instanceof Collection) {
             stopServices((Collection<?>)value);
@@ -168,9 +160,7 @@ public final class ServiceHelper {
         // then try to shutdown
         if (value instanceof ShutdownableService) {
             ShutdownableService service = (ShutdownableService)value;
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Shutting down service " + value);
-            }
+            LOG.trace("Shutting down service {}", value);
             service.shutdown();
         } else if (value instanceof Collection) {
             stopAndShutdownServices((Collection<?>)value);
@@ -195,9 +185,7 @@ public final class ServiceHelper {
             if (value instanceof ShutdownableService) {
                 ShutdownableService service = (ShutdownableService)value;
                 try {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("Shutting down service: " + service);
-                    }
+                    LOG.trace("Shutting down service: {}", service);
                     service.shutdown();
                 } catch (Exception e) {
                     if (LOG.isDebugEnabled()) {
@@ -318,9 +306,7 @@ public final class ServiceHelper {
         if (service instanceof SuspendableService) {
             SuspendableService ss = (SuspendableService) service;
             if (!ss.isSuspended()) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Suspending service " + service);
-                }
+                LOG.trace("Suspending service {}", service);
                 ss.suspend();
                 return true;
             } else {

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/UnitOfWorkHelper.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/UnitOfWorkHelper.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/UnitOfWorkHelper.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/UnitOfWorkHelper.java
 Fri Mar 25 22:34:26 2011
@@ -49,14 +49,10 @@ public final class UnitOfWorkHelper {
             for (Synchronization synchronization : copy) {
                 try {
                     if (failed) {
-                        if (log.isTraceEnabled()) {
-                            log.trace("Invoking synchronization.onFailure: " + 
synchronization + " with " + exchange);
-                        }
+                        log.trace("Invoking synchronization.onFailure: {} with 
{}", synchronization, exchange);
                         synchronization.onFailure(exchange);
                     } else {
-                        if (log.isTraceEnabled()) {
-                            log.trace("Invoking synchronization.onComplete: " 
+ synchronization + " with " + exchange);
-                        }
+                        log.trace("Invoking synchronization.onComplete: {} 
with {}", synchronization, exchange);
                         synchronization.onComplete(exchange);
                     }
                 } catch (Throwable e) {

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/ExecutorServiceHelper.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/ExecutorServiceHelper.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/ExecutorServiceHelper.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/util/concurrent/ExecutorServiceHelper.java
 Fri Mar 25 22:34:26 2011
@@ -355,9 +355,7 @@ public final class ExecutorServiceHelper
             Thread answer = new Thread(runnable, threadName);
             answer.setDaemon(daemon);
 
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Created thread[" + name + "]: " + answer);
-            }
+            LOG.trace("Created thread[{}]: {}", name, answer);
             return answer;
         }
 

Modified: 
camel/trunk/camel-core/src/test/java/org/apache/camel/converter/TimerDrivenTimePatternConverterTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/TimerDrivenTimePatternConverterTest.java?rev=1085587&r1=1085586&r2=1085587&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/test/java/org/apache/camel/converter/TimerDrivenTimePatternConverterTest.java
 (original)
+++ 
camel/trunk/camel-core/src/test/java/org/apache/camel/converter/TimerDrivenTimePatternConverterTest.java
 Fri Mar 25 22:34:26 2011
@@ -41,9 +41,7 @@ public class TimerDrivenTimePatternConve
         assertMockEndpointsSatisfied();
         long interval = watch.stop();
         
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Should take approx 2000 milliseconds, was: " + 
interval);
-        }
+        LOG.trace("Should take approx 2000 milliseconds, was: {}", interval);
         assertTrue("Should take approx 2000 milliseconds, was: " + interval, 
interval >= 1700);
     }
     


Reply via email to