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 1c54648217d CAMEL-18538: camel-jbang - Log command 1c54648217d is described below commit 1c54648217dbec9eeb2814bb6f5bc4cb9b7f5899 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon Jan 9 15:28:53 2023 +0100 CAMEL-18538: camel-jbang - Log command --- .../camel/dsl/jbang/core/commands/action/CamelLogAction.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelLogAction.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelLogAction.java index e0e2b0f3aae..0f5d9ff5fe2 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelLogAction.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelLogAction.java @@ -59,13 +59,17 @@ public class CamelLogAction extends ActionBaseCommand { boolean loggingColor = true; @CommandLine.Option(names = { "--timestamp" }, defaultValue = "true", - description = "Print timestamp") + description = "Print timestamp.") boolean timestamp = true; @CommandLine.Option(names = { "--follow" }, defaultValue = "true", description = "Keep following and outputting new log lines (use ctrl + c to exit).") boolean follow = true; + @CommandLine.Option(names = { "--prefix" }, defaultValue = "true", + description = "Print prefix with running Camel integration name.") + boolean prefix = true; + @CommandLine.Option(names = { "--tail" }, description = "The number of lines from the end of the logs to show. Defaults to showing all logs.") int tail; @@ -282,6 +286,9 @@ public class CamelLogAction extends ActionBaseCommand { } protected void printLine(String name, String line) { + if (!prefix) { + name = null; + } if (!timestamp) { // after timestamp is after 2 sine-space int pos = line.indexOf(' ');