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

davsclaus pushed a commit to branch CAMEL-13870
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/CAMEL-13870 by this push:
     new 3615857  CAMEL-13870: Fast property configuration of Camel endpoints. 
Work in progress.
3615857 is described below

commit 3615857fe93bd755fbb8f472eec9beebda9384cd
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Aug 21 13:47:23 2019 +0200

    CAMEL-13870: Fast property configuration of Camel endpoints. Work in 
progress.
---
 .../org/apache/camel/component/log/LogComponent.java | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git 
a/components/camel-log/src/main/java/org/apache/camel/component/log/LogComponent.java
 
b/components/camel-log/src/main/java/org/apache/camel/component/log/LogComponent.java
index d9c4a4c..7176455 100644
--- 
a/components/camel-log/src/main/java/org/apache/camel/component/log/LogComponent.java
+++ 
b/components/camel-log/src/main/java/org/apache/camel/component/log/LogComponent.java
@@ -56,16 +56,6 @@ public class LogComponent extends DefaultComponent {
                 log.info("More than one {} instance found in the registry. 
Falling back to creating logger from URI {}.", Logger.class.getName(), uri);
             }
         }
-        
-        LogEndpoint endpoint = new LogEndpoint(uri, this);
-        endpoint.setLevel(level.name());
-        setProperties(endpoint, parameters);
-      
-        if (providedLogger == null) {
-            endpoint.setLoggerName(remaining);
-        } else {
-            endpoint.setProvidedLogger(providedLogger);
-        }
 
         // first, try to pick up the ExchangeFormatter from the registry
         ExchangeFormatter localFormatter = 
getCamelContext().getRegistry().lookupByNameAndType("logFormatter", 
ExchangeFormatter.class);
@@ -80,7 +70,17 @@ public class LogComponent extends DefaultComponent {
             localFormatter = new DefaultExchangeFormatter();
             setProperties(localFormatter, parameters);
         }
+
+        LogEndpoint endpoint = new LogEndpoint(uri, this);
+        endpoint.setLevel(level.name());
         endpoint.setLocalFormatter(localFormatter);
+        if (providedLogger == null) {
+            endpoint.setLoggerName(remaining);
+        } else {
+            endpoint.setProvidedLogger(providedLogger);
+        }
+        setProperties(endpoint, parameters);
+
         return endpoint;
     }
 

Reply via email to