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/01/05 13:49:15 UTC

[camel] branch main updated: CAMEL-17415: camel-jbang - Add --trace option

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

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


The following commit(s) were added to refs/heads/main by this push:
     new c30ea17  CAMEL-17415: camel-jbang - Add --trace option
c30ea17 is described below

commit c30ea1700365187389da9732ffae3f19c864643e
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jan 5 14:48:30 2022 +0100

    CAMEL-17415: camel-jbang - Add --trace option
---
 .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java   | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
index b63c431..abd3be0 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
@@ -70,6 +70,9 @@ class Run implements Callable<Integer> {
     @Option(names = { "--reload" }, description = "Enables live reload when source file is changed (saved)")
     private boolean reload;
 
+    @Option(names = { "--trace" }, description = "Enables trace logging of the routed messages")
+    private boolean trace;
+
     @Option(names = { "--properties" },
             description = "Load properties file for route placeholders (ex. /path/to/file.properties")
     private String propertiesFiles;
@@ -135,6 +138,7 @@ class Run implements Callable<Integer> {
         main.addInitialProperty("camel.main.shutdownTimeout", "5");
         // turn off lightweight if we have routes reload enabled
         main.addInitialProperty("camel.main.routesReloadEnabled", reload ? "true" : "false");
+        main.addInitialProperty("camel.main.tracing", trace ? "true" : "false");
 
         // durations
         if (maxMessages > 0) {