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 2026/05/26 21:08:11 UTC
(camel) 01/01: CAMEL-23615: Force colored logging when TUI launches examples
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch CAMEL-23615-tui-log-color
in repository https://gitbox.apache.org/repos/asf/camel.git
commit f84966f745f5fa1317dceeecfb2a141a2aabb30d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue May 26 23:07:55 2026 +0200
CAMEL-23615: Force colored logging when TUI launches examples
When the TUI launches examples via F2, stdout is redirected to a file
so the child process detects no TTY and disables ANSI colors. Pass
--logging-color=true explicitly so log output includes color codes
that the TUI's LogTab already knows how to parse and render.
Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>
---
.../java/org/apache/camel/dsl/jbang/core/commands/tui/ActionsPopup.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ActionsPopup.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ActionsPopup.java
index a5050d6cc395..92e9df8f3365 100644
--- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ActionsPopup.java
+++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ActionsPopup.java
@@ -923,6 +923,7 @@ class ActionsPopup {
List<String> cmd = new ArrayList<>(LauncherHelper.getCamelCommand());
cmd.add("run");
cmd.add("--example=" + exampleName);
+ cmd.add("--logging-color=true");
cmd.addAll(extraArgs);
Path outputFile = Files.createTempFile("camel-example-", ".log");
outputFile.toFile().deleteOnExit();
@@ -1089,6 +1090,7 @@ class ActionsPopup {
List<String> cmd = new ArrayList<>(LauncherHelper.getCamelCommand());
cmd.add("run");
cmd.add("--example=" + exampleName);
+ cmd.add("--logging-color=true");
Path outputFile = Files.createTempFile("camel-example-", ".log");
outputFile.toFile().deleteOnExit();
ProcessBuilder pb = new ProcessBuilder(cmd);