camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmuel...@apache.org
Subject svn commit: r1134198 [3/5] - in /camel/trunk/components: camel-atom/src/main/java/org/apache/camel/component/atom/ camel-bam/src/main/java/org/apache/camel/bam/model/ camel-bam/src/main/java/org/apache/camel/bam/processor/ camel-bindy/src/main/java/org...
Date Fri, 10 Jun 2011 06:02:12 GMT
Modified: camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java (original)
+++ camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java Fri Jun 10 06:02:06 2011
@@ -137,9 +137,7 @@ public class JpaConsumer extends Schedul
 
             if (lockEntity(result, entityManager)) {
                 // process the current exchange
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Processing exchange: " + exchange);
-                }
+                LOG.debug("Processing exchange: {}", exchange);
                 try {
                     getProcessor().process(exchange);
                 } catch (Exception e) {
@@ -268,9 +266,7 @@ public class JpaConsumer extends Schedul
             return true;
         }
         try {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Acquiring exclusive lock on entity: " + entity);
-            }
+            LOG.debug("Acquiring exclusive lock on entity: {}", entity);
             entityManager.lock(entity, LockModeType.WRITE);
             return true;
         } catch (Exception e) {

Modified: camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmProducer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmProducer.java (original)
+++ camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmProducer.java Fri Jun 10 06:02:06 2011
@@ -55,8 +55,8 @@ public class Jt400PgmProducer extends De
         pgmCall.setParameterList(parameterList);
 
         if (LOG.isDebugEnabled()) {
-            LOG.trace("Starting to call PGM '" + commandStr + "' in host '" + iSeries.getSystemName()
-                    + "' authentication with the user '" + iSeries.getUserId() + "'");
+            LOG.trace("Starting to call PGM '{}' in host '{}' authentication with the user '{}'",
+                    new Object[]{commandStr, iSeries.getSystemName(), iSeries.getUserId()});
         }
 
         boolean result = pgmCall.run();

Modified: camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java (original)
+++ camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java Fri Jun 10 06:02:06 2011
@@ -178,9 +178,7 @@ public class KestrelComponent extends De
 
     public void closeMemcachedClient(String key, MemcachedClient memcachedClient) {
         try {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Closing client connection to " + key);
-            }
+            LOG.debug("Closing client connection to {}", key);
             memcachedClient.shutdown();
             memcachedClientCache.remove(key);
         } catch (Exception e) {

Modified: camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConsumer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConsumer.java (original)
+++ camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConsumer.java Fri Jun 10 06:02:06 2011
@@ -110,7 +110,7 @@ public class KestrelConsumer extends Def
         shutdownPending = true;
 
         if (log.isDebugEnabled()) {
-            log.debug("Preparing to shutdown, waiting for " + shutdownLatch.getCount() + " threads to complete.");
+            log.debug("Preparing to shutdown, waiting for {} threads to complete.", shutdownLatch.getCount());
         }
 
         // Wait for all threads to end
@@ -164,7 +164,7 @@ public class KestrelConsumer extends Def
                         exchanger = exchangerQueue.take();
                     } catch (InterruptedException e) {
                         if (log.isDebugEnabled()) {
-                            log.debug("Interrupted, are we stopping? " + (isStopping() || isStopped()));
+                            log.debug("Interrupted, are we stopping? {}", isStopping() || isStopped());
                         }
                         continue;
                     }
@@ -214,7 +214,7 @@ public class KestrelConsumer extends Def
                         exchanger.exchange(value);
                     } catch (InterruptedException e) {
                         if (log.isDebugEnabled()) {
-                            log.debug("Interrupted, are we stopping? " + (isStopping() || isStopped()));
+                            log.debug("Interrupted, are we stopping? {}", isStopping() || isStopped());
                         }
                         continue;
                     }
@@ -264,7 +264,7 @@ public class KestrelConsumer extends Def
                     exchangerQueue.put(exchanger);
                 } catch (InterruptedException e) {
                     if (log.isDebugEnabled()) {
-                        log.debug("Interrupted, are we stopping? " + (isStopping() || isStopped()));
+                        log.debug("Interrupted, are we stopping? {}", isStopping() || isStopped());
                     }
                     continue;
                 }
@@ -279,7 +279,7 @@ public class KestrelConsumer extends Def
                         value = exchanger.exchange(this);
                     } catch (InterruptedException e) {
                         if (log.isDebugEnabled()) {
-                            log.debug("Interrupted, are we stopping? " + (isStopping() || isStopped()));
+                            log.debug("Interrupted, are we stopping? {}", isStopping() || isStopped());
                         }
                         continue;
                     }

Modified: camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelProducer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelProducer.java (original)
+++ camel/trunk/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelProducer.java Fri Jun 10 06:02:06 2011
@@ -41,9 +41,7 @@ public class KestrelProducer extends Def
         String queue = endpoint.getQueue();
         if (msg != null) {
             try {
-                if (log.isDebugEnabled()) {
-                    log.debug("Sending to: " + queue + " message: " + msg);
-                }
+                log.debug("Sending to: {} message: {}", queue, msg);
                 memcachedClient.set(queue, 0, msg);
             } catch (Exception e) {
                 throw new CamelExchangeException("Error sending to: " + queue, exchange, e);

Modified: camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java (original)
+++ camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java Fri Jun 10 06:02:06 2011
@@ -53,7 +53,7 @@ public class LdapProducer extends Defaul
         if (returnedAttributes != null) {
             String returnedAtts[] = returnedAttributes.split(",");
             if (log.isDebugEnabled()) {
-                log.debug("Setting returning Attributes to searchControls: " + Arrays.toString(returnedAtts));
+                log.debug("Setting returning Attributes to searchControls: {}", Arrays.toString(returnedAtts));
             }
             searchControls.setReturningAttributes(returnedAtts);
         }
@@ -118,7 +118,7 @@ public class LdapProducer extends Defaul
         } while (prepareNextPage(ldapContext));
 
         if (log.isDebugEnabled()) {
-            log.debug("Found a total of " + data.size() + " entries for ldap filter " + searchFilter);
+            log.debug("Found a total of {} entries for ldap filter {}", data.size(), searchFilter);
         }
 
         return data;

Modified: camel/trunk/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java (original)
+++ camel/trunk/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java Fri Jun 10 06:02:06 2011
@@ -60,9 +60,7 @@ public class LuceneIndexer {
     }
 
     public void index(Exchange exchange) throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Indexing " + exchange);
-        }
+        LOG.debug("Indexing {}", exchange);
         openIndexWriter();
         Map<String, Object> headers = exchange.getIn().getHeaders();
         add("exchangeId", exchange.getExchangeId(), true);

Modified: camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java (original)
+++ camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java Fri Jun 10 06:02:06 2011
@@ -148,9 +148,7 @@ public class MailConsumer extends Schedu
 
         // limit if needed
         if (maxMessagesPerPoll > 0 && total > maxMessagesPerPoll) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Limiting to maximum messages to poll " + maxMessagesPerPoll + " as there was " + total + " messages in this poll.");
-            }
+            LOG.debug("Limiting to maximum messages to poll {} as there was {} messages in this poll.", maxMessagesPerPoll, total);
             total = maxMessagesPerPoll;
         }
 
@@ -234,7 +232,7 @@ public class MailConsumer extends Schedu
         int count = fetchSize == -1 ? messages.length : Math.min(fetchSize, messages.length);
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Fetching " + count + " messages. Total " + messages.length + " messages.");
+            LOG.debug("Fetching {} messages. Total {} messages.", count, messages.length);
         }
 
         for (int i = 0; i < count; i++) {
@@ -244,7 +242,7 @@ public class MailConsumer extends Schedu
                 answer.add(exchange);
             } else {
                 if (LOG.isDebugEnabled()) {
-                    LOG.debug("Skipping message as it was flagged as deleted: " + MailUtils.dumpMessage(message));
+                    LOG.debug("Skipping message as it was flagged as deleted: {}", MailUtils.dumpMessage(message));
                 }
             }
         }
@@ -258,7 +256,7 @@ public class MailConsumer extends Schedu
     protected void processExchange(Exchange exchange) throws Exception {
         if (LOG.isDebugEnabled()) {
             MailMessage msg = (MailMessage) exchange.getIn();
-            LOG.debug("Processing message: " + MailUtils.dumpMessage(msg.getMessage()));
+            LOG.debug("Processing message: {}", MailUtils.dumpMessage(msg.getMessage()));
         }
         getProcessor().process(exchange);
     }
@@ -323,7 +321,7 @@ public class MailConsumer extends Schedu
             folder = null;
 
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Connecting to MailStore: " + getEndpoint().getConfiguration().getMailStoreLogInformation());
+                LOG.debug("Connecting to MailStore: {}", getEndpoint().getConfiguration().getMailStoreLogInformation());
             }
             store = sender.getSession().getStore(config.getProtocol());
             store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
@@ -331,7 +329,7 @@ public class MailConsumer extends Schedu
 
         if (folder == null) {
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Getting folder " + config.getFolderName());
+                LOG.debug("Getting folder {}", config.getFolderName());
             }
             folder = store.getFolder(config.getFolderName());
             if (folder == null || !folder.exists()) {

Modified: camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailProducer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailProducer.java (original)
+++ camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailProducer.java Fri Jun 10 06:02:06 2011
@@ -45,7 +45,7 @@ public class MailProducer extends Defaul
             public void prepare(MimeMessage mimeMessage) throws Exception {
                 getEndpoint().getBinding().populateMailMessage(getEndpoint(), mimeMessage, exchange);
                 if (LOG.isDebugEnabled()) {
-                    LOG.debug("Sending MimeMessage: " + MailUtils.dumpMessage(mimeMessage));
+                    LOG.debug("Sending MimeMessage: {}", MailUtils.dumpMessage(mimeMessage));
                 }
             }
         });

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/security/DummyTrustManager.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/security/DummyTrustManager.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/security/DummyTrustManager.java (original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/security/DummyTrustManager.java Fri Jun 10 06:02:06 2011
@@ -49,7 +49,7 @@ public class DummyTrustManager implement
     private static void logCertificateChain(String type, X509Certificate[] chain) {
         if (LOG.isDebugEnabled()) {
             for (X509Certificate certificate : chain) {
-                LOG.debug(type + " certificate is trusted: " + certificate);
+                LOG.debug("{} certificate is trusted: {}", type, certificate);
             }
         }
     }

Modified: camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaComponent.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaComponent.java (original)
+++ camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaComponent.java Fri Jun 10 06:02:06 2011
@@ -238,18 +238,15 @@ public class MinaComponent extends Defau
             }
             addCodecFactory(config, codecFactory);
             if (LOG.isDebugEnabled()) {
-                LOG.debug(type + ": Using TextLineCodecFactory: " + codecFactory + " using encoding: "
-                        + charset + " line delimiter: " + configuration.getTextlineDelimiter()
-                        + "(" + delimiter + ")");
-                LOG.debug("Encoder maximum line length: " + codecFactory.getEncoderMaxLineLength()
-                        + ". Decoder maximum line length: " + codecFactory.getDecoderMaxLineLength());
+                LOG.debug("{}: Using TextLineCodecFactory: {} using encoding: {} line delimiter: {}({})",
+                        new Object[]{type, codecFactory, charset, configuration.getTextlineDelimiter(), delimiter});
+                LOG.debug("Encoder maximum line length: {}. Decoder maximum line length: {}",
+                        codecFactory.getEncoderMaxLineLength(), codecFactory.getDecoderMaxLineLength());
             }
         } else {
             ObjectSerializationCodecFactory codecFactory = new ObjectSerializationCodecFactory();
             addCodecFactory(config, codecFactory);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(type + ": Using ObjectSerializationCodecFactory: " + codecFactory);
-            }
+            LOG.debug("{}: Using ObjectSerializationCodecFactory: {}", type, codecFactory);
         }
         
     }
@@ -324,7 +321,7 @@ public class MinaComponent extends Defau
             codecFactory = new MinaUdpProtocolCodecFactory(getCamelContext(), charset);
 
             if (LOG.isDebugEnabled()) {
-                LOG.debug(type + ": Using CodecFactory: " + codecFactory + " using encoding: " + charset);
+                LOG.debug("{}: Using CodecFactory: {} using encoding: {}", new Object[]{type, codecFactory, charset});
             }
         }
 
@@ -362,9 +359,7 @@ public class MinaComponent extends Defau
             encoding = Charset.defaultCharset().name();
             // set in on configuration so its updated
             configuration.setEncoding(encoding);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(type + ": No encoding parameter using default charset: " + encoding);
-            }
+            LOG.debug("{}: No encoding parameter using default charset: {}", type, encoding);
         }
         if (!Charset.isSupported(encoding)) {
             throw new IllegalArgumentException("The encoding: " + encoding + " is not supported");

Modified: camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java (original)
+++ camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java Fri Jun 10 06:02:06 2011
@@ -100,7 +100,7 @@ public class MinaConsumer extends Defaul
                     // byte arrays is not readable so convert to string
                     in = getEndpoint().getCamelContext().getTypeConverter().convertTo(String.class, in);
                 }
-                LOG.debug("Received body: " + in);
+                LOG.debug("Received body: {}", in);
             }
 
             Exchange exchange = getEndpoint().createExchange(session, object);
@@ -139,16 +139,12 @@ public class MinaConsumer extends Defaul
                     if (getEndpoint().getConfiguration().isDisconnectOnNoReply()) {
                         // must close session if no data to write otherwise client will never receive a response
                         // and wait forever (if not timing out)
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("Closing session as no payload to send as reply at address: " + address);
-                        }
+                        LOG.debug("Closing session as no payload to send as reply at address: {}", address);
                         session.close();
                     }
                 } else {
                     // we got a response to write
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Writing body: " + body);
-                    }
+                    LOG.debug("Writing body: {}", body);
                     MinaHelper.writeBody(session, body, exchange);
                 }
             }
@@ -167,9 +163,7 @@ public class MinaConsumer extends Defaul
                 disconnect = close;
             }
             if (disconnect) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Closing session when complete at address: " + address);
-                }
+                LOG.debug("Closing session when complete at address: {}", address);
                 session.close();
             }
         }

Modified: camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java (original)
+++ camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java Fri Jun 10 06:02:06 2011
@@ -112,16 +112,14 @@ public class MinaProducer extends Defaul
                 // byte arrays is not readable so convert to string
                 out = exchange.getContext().getTypeConverter().convertTo(String.class, body);
             }
-            LOG.debug("Writing body : " + out);
+            LOG.debug("Writing body : {}", out);
         }
         // write the body
         MinaHelper.writeBody(session, body, exchange);
 
         if (sync) {
             // wait for response, consider timeout
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Waiting for response using timeout " + timeout + " millis.");
-            }
+            LOG.debug("Waiting for response using timeout {} millis.", timeout);
             boolean done = latch.await(timeout, TimeUnit.MILLISECONDS);
             if (!done) {
                 throw new ExchangeTimedOutException(exchange, timeout);
@@ -159,7 +157,7 @@ public class MinaProducer extends Defaul
         }
         if (disconnect) {
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Closing session when complete at address: " + getEndpoint().getAddress());
+                LOG.debug("Closing session when complete at address: {}", getEndpoint().getAddress());
             }
             session.close();
         }
@@ -176,7 +174,7 @@ public class MinaProducer extends Defaul
     @Override
     protected void doStop() throws Exception {
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Stopping connector: " + connector + " at address: " + getEndpoint().getAddress());
+            LOG.debug("Stopping connector: {} at address: {}", connector, getEndpoint().getAddress());
         }
         closeConnection();
         super.doStop();
@@ -200,7 +198,7 @@ public class MinaProducer extends Defaul
         SocketAddress address = getEndpoint().getAddress();
         connector = getEndpoint().getConnector();
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Creating connector to address: " + address + " using connector: " + connector + " timeout: " + timeout + " millis.");
+            LOG.debug("Creating connector to address: {} using connector: {} timeout: {} millis.", new Object[]{address, connector, timeout});
         }
         IoHandler ioHandler = new ResponseHandler(getEndpoint());
         // connect and wait until the connection is established
@@ -230,9 +228,7 @@ public class MinaProducer extends Defaul
 
         @Override
         public void messageReceived(IoSession ioSession, Object message) throws Exception {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Message received: " + message);
-            }
+            LOG.debug("Message received: {}", message);
             this.message = message;
             messageReceived = true;
             cause = null;
@@ -251,7 +247,7 @@ public class MinaProducer extends Defaul
             if (sync && !messageReceived) {
                 // sync=true (InOut mode) so we expected a message as reply but did not get one before the session is closed
                 if (LOG.isDebugEnabled()) {
-                    LOG.debug("Session closed but no message received from address: " + this.endpoint.getAddress());
+                    LOG.debug("Session closed but no message received from address: {}", this.endpoint.getAddress());
                 }
                 // session was closed but no message received. This could be because the remote server had an internal error
                 // and could not return a response. We should count down to stop waiting for a response

Modified: camel/trunk/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisConsumer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisConsumer.java (original)
+++ camel/trunk/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisConsumer.java Fri Jun 10 06:02:06 2011
@@ -146,9 +146,7 @@ public class MyBatisConsumer extends Sch
             pendingExchanges = total - index - 1;
 
             // process the current exchange
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Processing exchange: " + exchange);
-            }
+            LOG.debug("Processing exchange: {}", exchange);
             getProcessor().process(exchange);
 
             try {

Modified: camel/trunk/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/NagiosProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/NagiosProducer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/NagiosProducer.java (original)
+++ camel/trunk/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/NagiosProducer.java Fri Jun 10 06:02:06 2011
@@ -55,7 +55,7 @@ public class NagiosProducer extends Defa
         MessagePayload payload = new MessagePayload(hostName, level.ordinal(), serviceName, message);
 
         if (log.isDebugEnabled()) {
-            log.debug("Sending notification to Nagios: " + payload.getMessage());
+            log.debug("Sending notification to Nagios: {}", payload.getMessage());
         }
         sender.send(payload);
         log.trace("Sending notification done");

Modified: camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java (original)
+++ camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java Fri Jun 10 06:02:06 2011
@@ -45,9 +45,7 @@ public class DefaultClientPipelineFactor
 
         SslHandler sslHandler = configureClientSSLOnDemand();
         if (sslHandler != null) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Client SSL handler configured and added to the ChannelPipeline");
-            }
+            LOG.debug("Client SSL handler configured and added to the ChannelPipeline");
             channelPipeline.addLast("ssl", sslHandler);
         }
 

Modified: camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultServerPipelineFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultServerPipelineFactory.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultServerPipelineFactory.java (original)
+++ camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultServerPipelineFactory.java Fri Jun 10 06:02:06 2011
@@ -44,9 +44,7 @@ public class DefaultServerPipelineFactor
 
         SslHandler sslHandler = configureServerSSLOnDemand();
         if (sslHandler != null) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Server SSL handler configured and added as an interceptor against the ChannelPipeline");
-            }
+            LOG.debug("Server SSL handler configured and added as an interceptor against the ChannelPipeline");
             channelPipeline.addLast("ssl", sslHandler);            
         }
         List<ChannelDownstreamHandler> encoders = consumer.getConfiguration().getEncoders();

Modified: camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java (original)
+++ camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java Fri Jun 10 06:02:06 2011
@@ -135,22 +135,18 @@ public class NettyConfiguration implemen
                     decoders.add(new StringDecoder(charset));
 
                     if (LOG.isDebugEnabled()) {
-                        LOG.debug("Using textline encoders and decoders with charset: " + charset + ", delimiter: "
-                            + delimiter + " and decoderMaxLineLength: " + decoderMaxLineLength);
+                        LOG.debug("Using textline encoders and decoders with charset: {}, delimiter: {} and decoderMaxLineLength: {}", 
+                                new Object[]{charset, delimiter, decoderMaxLineLength});
                     }
                 } else {
                     // object serializable is then used
                     encoders.add(new ObjectEncoder());
                     decoders.add(new ObjectDecoder());
 
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Using object encoders and decoders");
-                    }
+                    LOG.debug("Using object encoders and decoders");
                 }
             } else {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("No encoders and decoders will be used");
-                }
+                LOG.debug("No encoders and decoders will be used");
             }
         } else {
             LOG.debug("Using configured encoders and/or decoders");

Modified: camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConsumer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConsumer.java (original)
+++ camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConsumer.java Fri Jun 10 06:02:06 2011
@@ -60,9 +60,7 @@ public class NettyConsumer extends Defau
 
     @Override
     protected void doStart() throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Netty consumer binding to: " + configuration.getAddress());
-        }
+        LOG.debug("Netty consumer binding to: {}", configuration.getAddress());
 
         super.doStart();
         if (isTcp()) {
@@ -76,9 +74,7 @@ public class NettyConsumer extends Defau
 
     @Override
     protected void doStop() throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Netty consumer unbinding from: " + configuration.getAddress());
-        }
+        LOG.debug("Netty consumer unbinding from: {}", configuration.getAddress());
 
         // close all channels
         ChannelGroupFuture future = allChannels.close();

Modified: camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java (original)
+++ camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java Fri Jun 10 06:02:06 2011
@@ -101,9 +101,7 @@ public class NettyProducer extends Defau
 
     @Override
     protected void doStop() throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Stopping producer at address: " + configuration.getAddress());
-        }
+        LOG.debug("Stopping producer at address: {}", configuration.getAddress());
         // close all channels
         ChannelGroupFuture future = ALL_CHANNELS.close();
         future.awaitUninterruptibly();
@@ -159,18 +157,14 @@ public class NettyProducer extends Defau
         }
 
         // log what we are writing
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Writing body: " + body);
-        }
+        LOG.debug("Writing body: {}", body);
         // write the body asynchronously
         ChannelFuture future = channel.write(body);
 
         // add listener which handles the operation
         future.addListener(new ChannelFutureListener() {
             public void operationComplete(ChannelFuture channelFuture) throws Exception {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Operation complete " + channelFuture);
-                }
+                LOG.debug("Operation complete {}", channelFuture);
                 if (!channelFuture.isSuccess()) {
                     // no success the set the caused exception and signal callback and break
                     exchange.setException(channelFuture.getCause());
@@ -196,7 +190,7 @@ public class NettyProducer extends Defau
                         }
                         if (disconnect) {
                             if (LOG.isDebugEnabled()) {
-                                LOG.debug("Closing channel when complete at address: " + getEndpoint().getConfiguration().getAddress());
+                                LOG.debug("Closing channel when complete at address: {}", getEndpoint().getConfiguration().getAddress());
                             }
                             NettyHelper.close(channel);
                         }
@@ -286,9 +280,7 @@ public class NettyProducer extends Defau
         // to keep track of all channels in use
         ALL_CHANNELS.add(channel);
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Creating connector to address: " + configuration.getAddress());
-        }
+        LOG.debug("Creating connector to address: {}", configuration.getAddress());
         return channel;
     }
 

Modified: camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java (original)
+++ camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java Fri Jun 10 06:02:06 2011
@@ -92,7 +92,7 @@ public class ClientChannelHandler extend
             // session was closed but no message received. This could be because the remote server had an internal error
             // and could not return a response. We should count down to stop waiting for a response
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Channel closed but no message received from address: " + producer.getConfiguration().getAddress());
+                LOG.debug("Channel closed but no message received from address: {}", producer.getConfiguration().getAddress());
             }
             exchange.setException(new CamelExchangeException("No response received from remote server: " + producer.getConfiguration().getAddress(), exchange));
             // signal callback
@@ -105,9 +105,7 @@ public class ClientChannelHandler extend
         messageReceived = true;
 
         Object body = messageEvent.getMessage();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Message received: " + body);
-        }
+        LOG.debug("Message received: {}", body);
 
         // if textline enabled then covert to a String which must be used for textline
         if (producer.getConfiguration().isTextline()) {
@@ -143,7 +141,7 @@ public class ClientChannelHandler extend
             }
             if (disconnect) {
                 if (LOG.isDebugEnabled()) {
-                    LOG.debug("Closing channel when complete at address: " + producer.getConfiguration().getAddress());
+                    LOG.debug("Closing channel when complete at address: {}", producer.getConfiguration().getAddress());
                 }
                 NettyHelper.close(ctx.getChannel());
             }

Modified: camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java (original)
+++ camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java Fri Jun 10 06:02:06 2011
@@ -75,9 +75,7 @@ public class ServerChannelHandler extend
     @Override
     public void messageReceived(ChannelHandlerContext ctx, MessageEvent messageEvent) throws Exception {
         Object in = messageEvent.getMessage();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Incoming message: " + in);
-        }
+        LOG.debug("Incoming message: {}", in);
 
         // create Exchange and let the consumer process it
         Exchange exchange = consumer.getEndpoint().createExchange(ctx, messageEvent);
@@ -125,7 +123,7 @@ public class ServerChannelHandler extend
                 // must close session if no data to write otherwise client will never receive a response
                 // and wait forever (if not timing out)
                 if (LOG.isDebugEnabled()) {
-                    LOG.debug("Closing channel as no payload to send as reply at address: " + messageEvent.getRemoteAddress());
+                    LOG.debug("Closing channel as no payload to send as reply at address: {}", messageEvent.getRemoteAddress());
                 }
                 NettyHelper.close(messageEvent.getChannel());
             }
@@ -136,9 +134,7 @@ public class ServerChannelHandler extend
             }
 
             // we got a body to write
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Writing body: " + body);
-            }
+            LOG.debug("Writing body: {}", body);
             if (consumer.getConfiguration().isTcp()) {
                 NettyHelper.writeBodySync(messageEvent.getChannel(), null, body, exchange);
             } else {
@@ -161,7 +157,7 @@ public class ServerChannelHandler extend
         }
         if (disconnect) {
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Closing channel when complete at address: " + messageEvent.getRemoteAddress());
+                LOG.debug("Closing channel when complete at address: {}", messageEvent.getRemoteAddress());
             }
             NettyHelper.close(messageEvent.getChannel());
         }

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomPipelineFactoryAsynchTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomPipelineFactoryAsynchTest.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomPipelineFactoryAsynchTest.java (original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomPipelineFactoryAsynchTest.java Fri Jun 10 06:02:06 2011
@@ -81,13 +81,9 @@ public class NettyCustomPipelineFactoryA
         });
         context.start();
         
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Beginning Test ---> testCustomClientPipelineFactory()");
-        }        
+        LOG.debug("Beginning Test ---> testCustomClientPipelineFactory()");       
         sendRequest();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Completed Test ---> testCustomClientPipelineFactory()");
-        }
+        LOG.debug("Completed Test ---> testCustomClientPipelineFactory()");
         context.stop();
         
         assertEquals("Forrest Gump: We was always taking long walks, and we was always looking for a guy named 'Charlie'", response);

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomPipelineFactorySynchTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomPipelineFactorySynchTest.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomPipelineFactorySynchTest.java (original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomPipelineFactorySynchTest.java Fri Jun 10 06:02:06 2011
@@ -81,13 +81,9 @@ public class NettyCustomPipelineFactoryS
         });
         context.start();
         
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Beginning Test ---> testCustomClientPipelineFactory()");
-        }        
+        LOG.debug("Beginning Test ---> testCustomClientPipelineFactory()");       
         sendRequest();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Completed Test ---> testCustomClientPipelineFactory()");
-        }
+        LOG.debug("Completed Test ---> testCustomClientPipelineFactory()");
         context.stop();
         
         assertEquals("Forrest Gump: We was always taking long walks, and we was always looking for a guy named 'Charlie'", response);

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLTest.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLTest.java (original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLTest.java Fri Jun 10 06:02:06 2011
@@ -77,13 +77,9 @@ public class NettySSLTest extends CamelT
         });
         context.start();
         
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Beginning Test ---> testSSLInOutWithNettyConsumer()");
-        }        
+        LOG.debug("Beginning Test ---> testSSLInOutWithNettyConsumer()");       
         sendRequest();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Completed Test ---> testSSLInOutWithNettyConsumer()");
-        }
+        LOG.debug("Completed Test ---> testSSLInOutWithNettyConsumer()");
         context.stop();
     }    
 

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPAsyncTest.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPAsyncTest.java (original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPAsyncTest.java Fri Jun 10 06:02:06 2011
@@ -62,18 +62,14 @@ public class NettyTCPAsyncTest extends C
 
     @Test
     public void testTCPInOnlyWithNettyConsumer() throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Beginning Test ---> testTCPInOnlyWithNettyConsumer()");
-        }
+        LOG.debug("Beginning Test ---> testTCPInOnlyWithNettyConsumer()");
         
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(1);
         sendFile("netty:tcp://localhost:5150?sync=false");
         
         mock.assertIsSatisfied();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Completed Test ---> testTCPInOnlyWithNettyConsumer()");
-        }            
+        LOG.debug("Completed Test ---> testTCPInOnlyWithNettyConsumer()");           
     }
     
     @Override

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPSyncNotLazyChannelTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPSyncNotLazyChannelTest.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPSyncNotLazyChannelTest.java (original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPSyncNotLazyChannelTest.java Fri Jun 10 06:02:06 2011
@@ -34,33 +34,25 @@ public class NettyTCPSyncNotLazyChannelT
 
     @Test
     public void testTCPStringInOutWithNettyConsumer() throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Beginning Test ---> testTCPInOutWithNettyConsumer()");
-        }
+        LOG.debug("Beginning Test ---> testTCPInOutWithNettyConsumer()");
 
         String response = producerTemplate.requestBody(
             "netty:tcp://localhost:5151?sync=true&lazyChannelCreation=false",
             "Epitaph in Kohima, India marking the WWII Battle of Kohima and Imphal, Burma Campaign - Attributed to John Maxwell Edmonds", String.class);
         assertEquals("When You Go Home, Tell Them Of Us And Say, For Your Tomorrow, We Gave Our Today.", response);
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Completed Test ---> testTCPInOutWithNettyConsumer()");
-        }
+        LOG.debug("Completed Test ---> testTCPInOutWithNettyConsumer()");
     }
 
     @Test
     public void testTCPObjectInOutWithNettyConsumer() throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Beginning Test ---> testUDPInOutWithNettyConsumer()");
-        }
+        LOG.debug("Beginning Test ---> testUDPInOutWithNettyConsumer()");
 
         Poetry poetry = new Poetry();
         Poetry response = (Poetry) producerTemplate.requestBody("netty:tcp://localhost:5151?sync=true&lazyChannelCreation=false", poetry);
         assertEquals("Dr. Sarojini Naidu", response.getPoet());
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Completed Test ---> testUDPInOutWithNettyConsumer()");
-        }
+        LOG.debug("Completed Test ---> testUDPInOutWithNettyConsumer()");
     }
 
     @Override

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java (original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java Fri Jun 10 06:02:06 2011
@@ -62,18 +62,14 @@ public class NettyUDPAsyncTest extends C
 
     @Test
     public void testUDPInOnlyWithNettyConsumer() throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Beginning Test ---> testUDPInOnlyWithNettyConsumer()");
-        }
+        LOG.debug("Beginning Test ---> testUDPInOnlyWithNettyConsumer()");
         
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(1);
         sendFile("netty:udp://localhost:5151?sync=false");
         mock.assertIsSatisfied();
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Completed Test ---> testUDPInOnlyWithNettyConsumer()");
-        }    
+        LOG.debug("Completed Test ---> testUDPInOnlyWithNettyConsumer()");   
     }
 
     

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java (original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java Fri Jun 10 06:02:06 2011
@@ -34,17 +34,13 @@ public class NettyUDPObjectSyncTest exte
     
     @Test
     public void testUDPObjectInOutWithNettyConsumer() throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Beginning Test ---> testUDPInOutWithNettyConsumer()");
-        }
+        LOG.debug("Beginning Test ---> testUDPInOutWithNettyConsumer()");
         
         Poetry poetry = new Poetry();
         Poetry response = producerTemplate.requestBody("netty:udp://localhost:5155?sync=true", poetry, Poetry.class);        
         assertEquals("Dr. Sarojini Naidu", response.getPoet());
         
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Completed Test ---> testUDPInOutWithNettyConsumer()");
-        }
+        LOG.debug("Completed Test ---> testUDPInOutWithNettyConsumer()");
     }    
     
     @Override

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java (original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java Fri Jun 10 06:02:06 2011
@@ -34,10 +34,7 @@ public class NettyUDPSyncTest extends Ca
 
     @Test
     public void testUDPStringInOutWithNettyConsumer() throws Exception {
-        
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Beginning Test ---> testUDPInOutWithNettyConsumer()");
-        }
+        LOG.debug("Beginning Test ---> testUDPInOutWithNettyConsumer()");
         
         for (int i = 0; i < 5; i++) {
             String response = producerTemplate.requestBody(
@@ -46,9 +43,7 @@ public class NettyUDPSyncTest extends Ca
             assertEquals("Go tell the Spartans, thou that passest by, That faithful to their precepts here we lie.", response);
         }
         
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Completed Test ---> testUDPInOutWithNettyConsumer()");
-        }        
+        LOG.debug("Completed Test ---> testUDPInOutWithNettyConsumer()");        
     }   
     
     @Override

Modified: camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterOperations.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterOperations.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterOperations.java (original)
+++ camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterOperations.java Fri Jun 10 06:02:06 2011
@@ -96,7 +96,7 @@ public class PrinterOperations implement
                 }    
             } else {
                 if (LOG.isDebugEnabled()) {
-                    LOG.debug("Issuing Job " + i + " to Printer: " + this.printService.getName());
+                    LOG.debug("Issuing Job {} to Printer: {}", i, this.printService.getName());
                 }
                 print(doc);
             }

Modified: camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java (original)
+++ camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java Fri Jun 10 06:02:06 2011
@@ -214,21 +214,15 @@ public class QuartzComponent extends Def
 
         Trigger existingTrigger = getScheduler().getTrigger(trigger.getName(), trigger.getGroup());
         if (existingTrigger == null) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Adding job using trigger: " + trigger.getGroup() + "/" + trigger.getName());
-            }
+            LOG.debug("Adding job using trigger: {}/{}", trigger.getGroup(), trigger.getName());
             getScheduler().scheduleJob(job, trigger);
         } else if (hasTriggerChanged(existingTrigger, trigger)) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Trigger: " + trigger.getGroup() + "/" + trigger.getName() + " already exists and will be updated by Quartz.");
-            }
+            LOG.debug("Trigger: {}/{} already exists and will be updated by Quartz.", trigger.getGroup(), trigger.getName());
             scheduler.addJob(job, true);
             trigger.setJobName(job.getName());
             scheduler.rescheduleJob(trigger.getName(), trigger.getGroup(), trigger);
         } else {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Trigger: " + trigger.getGroup() + "/" + trigger.getName() + " already exists and will be resumed automatically by Quartz.");
-            }
+            LOG.debug("Trigger: {}/{} already exists and will be resumed automatically by Quartz.", trigger.getGroup(), trigger.getName());
             if (!isClustered()) {
                 scheduler.resumeTrigger(trigger.getName(), trigger.getGroup());
             }
@@ -250,13 +244,9 @@ public class QuartzComponent extends Def
 
         if (isClustered()) {
             // do not pause jobs which are clustered, as we want the jobs to continue running on the other nodes
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Cannot pause job using trigger: " + trigger.getGroup() + "/" + trigger.getName() + " as the JobStore is clustered.");
-            }
+            LOG.debug("Cannot pause job using trigger: {}/{} as the JobStore is clustered.", trigger.getGroup(), trigger.getName());
         } else {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Pausing job using trigger: " + trigger.getGroup() + "/" + trigger.getName());
-            }
+            LOG.debug("Pausing job using trigger: {}/{}", trigger.getGroup(), trigger.getName());
             getScheduler().pauseTrigger(trigger.getName(), trigger.getGroup());
             getScheduler().pauseJob(trigger.getName(), trigger.getGroup());
         }
@@ -265,15 +255,11 @@ public class QuartzComponent extends Def
     public void deleteJob(String name, String group) throws SchedulerException {
         if (isClustered()) {
             // do not pause jobs which are clustered, as we want the jobs to continue running on the other nodes
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Cannot delete job using trigger: " + group + "/" + name + " as the JobStore is clustered.");
-            }
+            LOG.debug("Cannot delete job using trigger: {}/{} as the JobStore is clustered.", group, name);
         } else {
             Trigger trigger  = getScheduler().getTrigger(name, group);
             if (trigger != null) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Deleting job using trigger: " + group + "/" + name);
-                }
+                LOG.debug("Deleting job using trigger: {}/{}", group, name);
                 getScheduler().unscheduleJob(name, group);
             }
         }
@@ -456,7 +442,7 @@ public class QuartzComponent extends Def
 
         if (LOG.isDebugEnabled()) {
             String name = prop.getProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME);
-            LOG.debug("Creating SchedulerFactory: " + name + " with properties: " + prop);
+            LOG.debug("Creating SchedulerFactory: {} with properties: {}", name, prop);
         }
         return answer;
     }

Modified: camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java (original)
+++ camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java Fri Jun 10 06:02:06 2011
@@ -106,9 +106,7 @@ public class QuartzEndpoint extends Defa
             return;
         }
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Firing Quartz Job with context: " + jobExecutionContext);
-        }
+        LOG.debug("Firing Quartz Job with context: {}", jobExecutionContext);
         Exchange exchange = createExchange(jobExecutionContext);
         try {
             balancer.process(exchange);
@@ -207,9 +205,7 @@ public class QuartzEndpoint extends Defa
 
     public synchronized void consumerStarted(final QuartzConsumer consumer) throws SchedulerException {
         ObjectHelper.notNull(trigger, "trigger");
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Adding consumer " + consumer.getProcessor());
-        }
+        LOG.debug("Adding consumer {}", consumer.getProcessor());
         getLoadBalancer().addProcessor(consumer.getProcessor());
 
         // if we have not yet added our default trigger, then lets do it
@@ -226,9 +222,7 @@ public class QuartzEndpoint extends Defa
             started = false;
         }
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Removing consumer " + consumer.getProcessor());
-        }
+        LOG.debug("Removing consumer {}", consumer.getProcessor());
         getLoadBalancer().removeProcessor(consumer.getProcessor());
     }
 

Modified: camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/ScheduledRoutePolicy.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/ScheduledRoutePolicy.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/ScheduledRoutePolicy.java (original)
+++ camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/ScheduledRoutePolicy.java Fri Jun 10 06:02:06 2011
@@ -38,9 +38,7 @@ public abstract class ScheduledRoutePoli
     protected abstract Trigger createTrigger(Action action, Route route) throws Exception;
 
     protected void onJobExecute(Action action, Route route) throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Scheduled Event notification received. Performing requested operation " + action + " for route " + route.getId());
-        }
+        LOG.debug("Scheduled Event notification received. Performing requested operation {} for route {}", action, route.getId());
         ServiceStatus routeStatus = route.getRouteContext().getCamelContext().getRouteStatus(route.getId());
         if (action == Action.START) {
             if (routeStatus == ServiceStatus.Stopped) {
@@ -82,7 +80,7 @@ public abstract class ScheduledRoutePoli
         getScheduler().scheduleJob(jobDetail, trigger);
         
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Scheduled Trigger: " + trigger.getFullName()  + " is operational");
+            LOG.debug("Scheduled Trigger: {} is operational", trigger.getFullName());
         }
     }    
 
@@ -92,9 +90,7 @@ public abstract class ScheduledRoutePoli
         
         getScheduler().pauseTrigger(triggerName, triggerGroup);
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Scheduled Trigger: " + triggerGroup + "." + triggerName + " is paused");
-        }
+        LOG.debug("Scheduled Trigger: {}. {} is paused", triggerGroup, triggerName);
     }
     
     public void resumeRouteTrigger(Action action) throws SchedulerException {
@@ -103,9 +99,7 @@ public abstract class ScheduledRoutePoli
         
         getScheduler().resumeTrigger(triggerName, triggerGroup);
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Scheduled Trigger: " + triggerGroup + "." + triggerName + " has been resumed");
-        }
+        LOG.debug("Scheduled Trigger: {}. {} has been resumed", triggerGroup, triggerName);
     }
 
     public void deleteRouteJob(Action action) throws SchedulerException {
@@ -116,9 +110,7 @@ public abstract class ScheduledRoutePoli
             getScheduler().deleteJob(jobDetailName, jobDetailGroup);
         }
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Scheduled Job: " + jobDetailGroup + "." + jobDetailName + " has been deleted");
-        }
+        LOG.debug("Scheduled Job: {}. {} has been deleted", jobDetailGroup, jobDetailName);
     }
     
     protected JobDetail createJobDetail(Action action, Route route) throws Exception {

Modified: camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEngine.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEngine.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEngine.java (original)
+++ camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEngine.java Fri Jun 10 06:02:06 2011
@@ -443,7 +443,7 @@ public class QuickfixjEngine {
 
         private void dispatch(QuickfixjEventCategory quickfixjEventCategory, SessionID sessionID, Message message) throws Exception {
             if (LOG.isDebugEnabled()) {
-                LOG.debug("FIX event dispatched: " + quickfixjEventCategory + " " + (message != null ? message : ""));
+                LOG.debug("FIX event dispatched: {} {}", quickfixjEventCategory, message != null ? message : "");
             }
             for (QuickfixjEventListener listener : eventListeners) {
                 // Exceptions propagate back to the FIX engine so sequence numbers can be adjusted

Modified: camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjProducer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjProducer.java (original)
+++ camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjProducer.java Fri Jun 10 06:02:06 2011
@@ -45,9 +45,7 @@ public class QuickfixjProducer extends D
     void sendMessage(Exchange exchange, org.apache.camel.Message camelMessage) throws InterruptedException {
         try {
             Message message = camelMessage.getBody(Message.class);
-            if (log.isDebugEnabled()) {
-                log.debug("Sending FIX message: " + message.toString());
-            }
+            log.debug("Sending FIX message: {}", message);
 
             SessionID messageSessionID = sessionID;
             if (messageSessionID == null) {

Modified: camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/examples/routing/FixMessageRouter.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/examples/routing/FixMessageRouter.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/examples/routing/FixMessageRouter.java (original)
+++ camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/examples/routing/FixMessageRouter.java Fri Jun 10 06:02:06 2011
@@ -56,9 +56,7 @@ public class FixMessageRouter {
             SessionID destinationSession = getDestinationSessionID(message);
             if (destinationSession != null) {
                 String destinationUri = String.format("%s?sessionID=%s", engineUri, destinationSession);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Routing destination: " + destinationUri);
-                }
+                LOG.debug("Routing destination: {}", destinationUri);
                 return destinationUri;
             }
         }

Modified: camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java (original)
+++ camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java Fri Jun 10 06:02:06 2011
@@ -60,10 +60,7 @@ public class DefaultRestletBinding imple
         for (Map.Entry<String, Object> entry : request.getAttributes().entrySet()) {
             if (!headerFilterStrategy.applyFilterToExternalHeaders(entry.getKey(), entry.getValue(), exchange)) {
                 inMessage.setHeader(entry.getKey(), entry.getValue());
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Populate exchange from Restlet request header: "
-                            + entry.getKey() + " value: " + entry.getValue());
-                }
+                LOG.debug("Populate exchange from Restlet request header: {} value: {}", entry.getKey(), entry.getValue());
             }
         }
 
@@ -89,16 +86,11 @@ public class DefaultRestletBinding imple
             for (Map.Entry<String, String> entry : form.getValuesMap().entrySet()) {
                 if (entry.getValue() == null) {
                     inMessage.setBody(entry.getKey());
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Populate exchange from Restlet request body: " + entry.getValue());
-                    }
+                    LOG.debug("Populate exchange from Restlet request body: {}", entry.getValue());
                 } else {
                     if (!headerFilterStrategy.applyFilterToExternalHeaders(entry.getKey(), entry.getValue(), exchange)) {
                         inMessage.setHeader(entry.getKey(), entry.getValue());
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("Populate exchange from Restlet request user header: "
-                                    + entry.getKey() + " value: " + entry.getValue());
-                        }
+                        LOG.debug("Populate exchange from Restlet request user header: {} value: {}", entry.getKey(), entry.getValue());
                     }
                 }
             }
@@ -120,9 +112,7 @@ public class DefaultRestletBinding imple
             mediaType = MediaType.APPLICATION_WWW_FORM;
         }
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Populate Restlet request from exchange body: " + body + " using media type " + mediaType);
-        }
+        LOG.debug("Populate Restlet request from exchange body: {} using media type {}", body, mediaType);
 
         // login and password are filtered by header filter strategy
         String login = exchange.getIn().getHeader(RestletConstants.RESTLET_LOGIN, String.class);
@@ -149,16 +139,11 @@ public class DefaultRestletBinding imple
                     // For non-form post put all the headers in attributes
                     request.getAttributes().put(entry.getKey(), entry.getValue());
                 }
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Populate Restlet request from exchange header: "
-                            + entry.getKey() + " value: " + entry.getValue());
-                }
+                LOG.debug("Populate Restlet request from exchange header: {} value: {}", entry.getKey(), entry.getValue());
             }
         }
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Using Content Type: " + mediaType + " for POST data: " + body);
-        }
+        LOG.debug("Using Content Type: {} for POST data: {}", mediaType, body);
 
         // Only URL Encode for GET and form POST
         if (request.getMethod() == Method.GET || (request.getMethod() == Method.POST && mediaType == MediaType.APPLICATION_WWW_FORM)) {
@@ -209,10 +194,7 @@ public class DefaultRestletBinding imple
         for (Map.Entry<String, Object> entry : out.getHeaders().entrySet()) {
             if (!headerFilterStrategy.applyFilterToCamelHeaders(entry.getKey(), entry.getValue(), exchange)) {
                 response.getAttributes().put(entry.getKey(), entry.getValue());
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Populate Restlet response from exchange header: "
-                            + entry.getKey() + " value: " + entry.getValue());
-                }
+                LOG.debug("Populate Restlet response from exchange header: {} value: {}", entry.getKey(), entry.getValue());
             }
         }
 
@@ -251,10 +233,7 @@ public class DefaultRestletBinding imple
         for (Map.Entry<String, Object> entry : response.getAttributes().entrySet()) {
             if (!headerFilterStrategy.applyFilterToExternalHeaders(entry.getKey(), entry.getValue(), exchange)) {
                 exchange.getOut().setHeader(entry.getKey(), entry.getValue());
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Populate exchange from Restlet response header: "
-                            + entry.getKey() + " value: " + entry.getValue());
-                }
+                LOG.debug("Populate exchange from Restlet response header: {} value: {}", entry.getKey(), entry.getValue());
             }
         }
 
@@ -274,9 +253,7 @@ public class DefaultRestletBinding imple
 
             // get content text
             String text = response.getEntity().getText();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Populate exchange from Restlet response: " + text);
-            }
+            LOG.debug("Populate exchange from Restlet response: {}", text);
             exchange.getOut().setBody(text);
         }
     }

Modified: camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/MethodBasedRouter.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/MethodBasedRouter.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/MethodBasedRouter.java (original)
+++ camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/MethodBasedRouter.java Fri Jun 10 06:02:06 2011
@@ -46,18 +46,13 @@ class MethodBasedRouter extends Restlet 
     
     @Override
     public void handle(Request request, Response response) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("MethodRouter (" + uriPattern + ") received request method: " 
-                    + request.getMethod());
-        }
+        LOG.debug("MethodRouter ({}) received request method: {}", uriPattern, request.getMethod());
         
         Restlet target = routes.get(request.getMethod());
         if (target != null) {
             target.handle(request, response);
         } else {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("No route for request method: " + request.getMethod());
-            }
+            LOG.debug("No route for request method: {}", request.getMethod());
             response.setStatus(Status.CLIENT_ERROR_NOT_FOUND);
         }
     }

Modified: camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java (original)
+++ camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java Fri Jun 10 06:02:06 2011
@@ -144,8 +144,7 @@ public class RestletComponent extends He
             }
 
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Detached restlet uriPattern: " + router.getUriPattern() 
-                          + " method: " + endpoint.getRestletMethod());
+                LOG.debug("Detached restlet uriPattern: {} method: {}", router.getUriPattern(), endpoint.getRestletMethod());
             }
         }
     }    
@@ -155,9 +154,7 @@ public class RestletComponent extends He
             MethodBasedRouter result = routers.get(uriPattern);
             if (result == null) {
                 result = new MethodBasedRouter(uriPattern);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Added method based router: " + result);
-                }
+                LOG.debug("Added method based router: {}", result);
                 routers.put(uriPattern, result);
             }
             return result;
@@ -172,9 +169,7 @@ public class RestletComponent extends He
             if (server == null) {
                 server = component.getServers().add(Protocol.valueOf(endpoint.getProtocol()), endpoint.getPort());
                 servers.put(key, server);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Added server: " + key);
-                }
+                LOG.debug("Added server: {}", key);
                 server.start();
             }
         }
@@ -198,31 +193,25 @@ public class RestletComponent extends He
             guard.setVerifier(verifier);
             guard.setNext(target);
             target = guard;
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Target has been set to guard: " + guard);
-            }
+            LOG.debug("Target has been set to guard: {}", guard);
         }
         
         if (endpoint.getRestletMethods() != null) {
             Method[] methods = endpoint.getRestletMethods();
             for (Method method : methods) {
                 router.addRoute(method, target);   
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Attached restlet uriPattern: " + uriPattern + " method: " + method);
-                }
+                LOG.debug("Attached restlet uriPattern: {} method: {}", uriPattern, method);
             }
         } else {
             router.addRoute(endpoint.getRestletMethod(), target);
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Attached restlet uriPattern: " + uriPattern + " method: " + endpoint.getRestletMethod());
+                LOG.debug("Attached restlet uriPattern: {} method: {}", uriPattern, endpoint.getRestletMethod());
             }
         }
         
         if (!router.hasBeenAttached()) {
             component.getDefaultHost().attach(uriPattern, router);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Attached methodRouter uriPattern: " + uriPattern);
-            }
+            LOG.debug("Attached methodRouter uriPattern: {}", uriPattern);
         }
     }
 

Modified: camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletConsumer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletConsumer.java (original)
+++ camel/trunk/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletConsumer.java Fri Jun 10 06:02:06 2011
@@ -43,9 +43,7 @@ public class RestletConsumer extends Def
         restlet = new Restlet() {
             @Override
             public void handle(Request request, Response response) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Consumer restlet handle request method: " + request.getMethod());
-                }
+                LOG.debug("Consumer restlet handle request method: {}", request.getMethod());
                 
                 try {
                     Exchange exchange = getEndpoint().createExchange();

Modified: camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxServiceSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxServiceSupport.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxServiceSupport.java (original)
+++ camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxServiceSupport.java Fri Jun 10 06:02:06 2011
@@ -54,7 +54,7 @@ public abstract class RouteboxServiceSup
         if (!(routeBuildersList.isEmpty())) {
             for (RouteBuilder routeBuilder : routeBuildersList) {
                 if (log.isDebugEnabled()) {
-                    log.debug("Adding RouteBuilder " + routeBuilder + " to " + context.getName());
+                    log.debug("Adding RouteBuilder {} to {}", routeBuilder, context.getName());
                 }
                 context.addRoutes(routeBuilder);
             }

Modified: camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/direct/RouteboxDirectProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/direct/RouteboxDirectProducer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/direct/RouteboxDirectProducer.java (original)
+++ camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/direct/RouteboxDirectProducer.java Fri Jun 10 06:02:06 2011
@@ -46,9 +46,7 @@ public class RouteboxDirectProducer exte
         if ((((RouteboxDirectEndpoint)getRouteboxEndpoint()).getConsumer() == null) && (getRouteboxEndpoint().getConfig().isSendToConsumer())) {
             throw new CamelExchangeException("No consumers available on endpoint: " + getRouteboxEndpoint(), exchange);
         } else {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Dispatching to Inner Route " + exchange);
-            }
+            LOG.debug("Dispatching to Inner Route {}", exchange);
             RouteboxDispatcher dispatcher = new RouteboxDispatcher(producer);
             result = dispatcher.dispatchSync(getRouteboxEndpoint(), exchange);
         }
@@ -67,9 +65,7 @@ public class RouteboxDirectProducer exte
             flag = true;
         } else {
             try {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Dispatching to Inner Route " + exchange);
-                }
+                LOG.debug("Dispatching to Inner Route {}", exchange);
                 
                 RouteboxDispatcher dispatcher = new RouteboxDispatcher(producer);
                 exchange = dispatcher.dispatchAsync(getRouteboxEndpoint(), exchange);      

Modified: camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/seda/RouteboxSedaConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/seda/RouteboxSedaConsumer.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/seda/RouteboxSedaConsumer.java (original)
+++ camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/seda/RouteboxSedaConsumer.java Fri Jun 10 06:02:06 2011
@@ -80,7 +80,7 @@ public class RouteboxSedaConsumer extend
                 dispatchToInnerRoute(queue, exchange);
             } catch (InterruptedException e) {
                 if (LOG.isDebugEnabled()) {
-                    LOG.debug("Sleep interrupted, are we stopping? " + (isStopping() || isStopped()));
+                    LOG.debug("Sleep interrupted, are we stopping? {}", isStopping() || isStopped());
                 }
                 continue;
             }
@@ -93,9 +93,7 @@ public class RouteboxSedaConsumer extend
         if (exchange != null) {
             if (isRunAllowed()) {
                 try {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Dispatching to inner route: " + exchange);
-                    }
+                    LOG.debug("Dispatching to inner route: {}", exchange);
                     RouteboxDispatcher dispatcher = new RouteboxDispatcher(producer);
                     result = dispatcher.dispatchAsync(getRouteboxEndpoint(), exchange); 
                     AsyncProcessorHelper.process(processor, result, new AsyncCallback() {

Modified: camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/strategy/RouteboxDispatcher.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/strategy/RouteboxDispatcher.java?rev=1134198&r1=1134197&r2=1134198&view=diff
==============================================================================
--- camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/strategy/RouteboxDispatcher.java (original)
+++ camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/strategy/RouteboxDispatcher.java Fri Jun 10 06:02:06 2011
@@ -54,7 +54,7 @@ public class RouteboxDispatcher {
         Exchange reply;
         
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Dispatching exchange " + exchange + " to endpoint " + endpoint.getEndpointUri());
+            LOG.debug("Dispatching exchange {} to endpoint {}", exchange, endpoint.getEndpointUri());
         }
         
         dispatchUri = selectDispatchUri(endpoint, exchange);
@@ -73,7 +73,7 @@ public class RouteboxDispatcher {
         Exchange reply;
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Dispatching exchange " + exchange + " to endpoint " + endpoint.getEndpointUri());
+            LOG.debug("Dispatching exchange {} to endpoint {}", exchange, endpoint.getEndpointUri());
         }
         
         dispatchUri = selectDispatchUri(endpoint, exchange);



Mime
View raw message