This is an automated email from the ASF dual-hosted git repository.
gnodet 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 385ce72d6db3 Fix trace action handler to forward dump parameter to
DevConsole (#23419)
385ce72d6db3 is described below
commit 385ce72d6db3aa35d58e1eabe47dccc70685a4b0
Author: Guillaume Nodet <[email protected]>
AuthorDate: Thu May 21 14:44:18 2026 +0200
Fix trace action handler to forward dump parameter to DevConsole (#23419)
The doActionTraceTask() handler only checked for the "enabled"
parameter and ignored "dump". When a caller requested a trace dump
via the action file IPC, only status metadata was returned instead
of the actual traced messages. Forward the dump parameter so
TraceDevConsole calls dumpAllTracedMessages() and returns the
trace array.
Co-authored-by: Claude Opus 4.6 <[email protected]>
---
.../org/apache/camel/cli/connector/LocalCliConnector.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git
a/dsl/camel-cli-connector/src/main/java/org/apache/camel/cli/connector/LocalCliConnector.java
b/dsl/camel-cli-connector/src/main/java/org/apache/camel/cli/connector/LocalCliConnector.java
index 3ea9020b287b..2345d81ec63a 100644
---
a/dsl/camel-cli-connector/src/main/java/org/apache/camel/cli/connector/LocalCliConnector.java
+++
b/dsl/camel-cli-connector/src/main/java/org/apache/camel/cli/connector/LocalCliConnector.java
@@ -763,13 +763,16 @@ public class LocalCliConnector extends ServiceSupport
implements CliConnector, C
DevConsole dc =
camelContext.getCamelContextExtension().getContextPlugin(DevConsoleRegistry.class)
.resolveById("trace");
if (dc != null) {
+ Map<String, Object> params = new HashMap<>();
String enabled = root.getString("enabled");
- JsonObject json;
if (enabled != null) {
- json = (JsonObject) dc.call(DevConsole.MediaType.JSON,
Map.of("enabled", enabled));
- } else {
- json = (JsonObject) dc.call(DevConsole.MediaType.JSON);
+ params.put("enabled", enabled);
+ }
+ String dump = root.getString("dump");
+ if (dump != null) {
+ params.put("dump", dump);
}
+ JsonObject json = (JsonObject) dc.call(DevConsole.MediaType.JSON,
params);
LOG.trace("Updating output file: {}", outputFile);
IOHelper.writeText(json.toJson(), outputFile);
} else {