You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/03/21 16:46:50 UTC

[camel] 03/03: CAMEL-17831: camel-main - Auto configuration summary (show from where the option was taken)

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

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

commit 4bb8e836f55e7b60cbb9dbd531171f2b0f1f7c22
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 21 17:45:53 2022 +0100

    CAMEL-17831: camel-main - Auto configuration summary (show from where the option was taken)
---
 .../src/main/java/org/apache/camel/main/BaseMainSupport.java      | 8 ++++++++
 1 file changed, 8 insertions(+)

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 cb008f0..93fedbf 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
@@ -1619,6 +1619,14 @@ public abstract class BaseMainSupport extends BaseService {
             int pos = loc.length() - 28;
             loc = loc.substring(pos);
         }
+        // let us have human friendly locations
+        if ("initial".equals(loc) || "override".equals(loc)) {
+            loc = "camel-main";
+        } else if ("SYS".equals(loc)) {
+            loc = "JVM System Property";
+        } else if ("ENV".equals(loc)) {
+            loc = "OS Environment Variable";
+        }
         loc = "[" + loc + "]";
         loc = String.format("%-30s", loc);
         return loc;