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

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


The following commit(s) were added to refs/heads/camel-3.20.x by this push:
     new 8a96e6db8cc camel-main - Avoid logging property placeholder header if 
no placeholders.
8a96e6db8cc is described below

commit 8a96e6db8cc97556470b52553dec9377ef7ea49c
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Mon Jan 30 18:00:44 2023 +0100

    camel-main - Avoid logging property placeholder header if no placeholders.
---
 .../src/main/java/org/apache/camel/main/BaseMainSupport.java        | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java 
b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
index b5711dd9d03..7d5835683eb 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
@@ -723,7 +723,7 @@ public abstract class BaseMainSupport extends BaseService {
                 public void notify(CamelEvent event) throws Exception {
                     // log summary of configurations
                     if (!propertyPlaceholders.isEmpty()) {
-                        LOG.info("Property-placeholders summary");
+                        boolean header = true;
                         for (var entry : propertyPlaceholders.entrySet()) {
                             String k = entry.getKey().toString();
                             Object v = entry.getValue();
@@ -733,6 +733,10 @@ public abstract class BaseMainSupport extends BaseService {
                             boolean same = ObjectHelper.equal(v, dv);
                             boolean skip = "templateId".equals(k);
                             if (!same && !skip) {
+                                if (header) {
+                                    LOG.info("Property-placeholders summary");
+                                    header = false;
+                                }
                                 String loc = 
locationSummary(propertyPlaceholders, k);
                                 if (SensitiveUtils.containsSensitive(k)) {
                                     LOG.info("    {} {}=xxxxxx", loc, k);

Reply via email to