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 7330304b33e Update log-eip.adoc (#16481)
7330304b33e is described below
commit 7330304b33ec00eb810a676a788ce0410a66220f
Author: Raymond Meester <[email protected]>
AuthorDate: Sun Dec 8 09:18:21 2024 +0100
Update log-eip.adoc (#16481)
- Add example of logging a formatted exchange
---
.../src/main/docs/modules/eips/pages/log-eip.adoc | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git
a/core/camel-core-engine/src/main/docs/modules/eips/pages/log-eip.adoc
b/core/camel-core-engine/src/main/docs/modules/eips/pages/log-eip.adoc
index 82f82ed73ac..da56125c3a8 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/log-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/log-eip.adoc
@@ -27,7 +27,7 @@ include::partial$eip-options.adoc[]
include::partial$eip-exchangeProperties.adoc[]
// eip exchangeProperties: END
-=== Difference between Log EIP and Log component
+== Difference between Log EIP and Log component
This log EIP is much lighter and meant for logging human logs such as
`Starting to do ...` etc.
It can only log a message based on the
xref:languages:simple-language.adoc[Simple] language.
@@ -35,6 +35,18 @@ It can only log a message based on the
xref:languages:simple-language.adoc[Simpl
The xref:ROOT:log-component.adoc[log] component is meant for logging the
message content (body, headers, etc).
There are many options on the log component to configure what content to log.
+The log component provides fine-grained control over which parts of the
exchange are logged or not.
+However, it's possible to quickly log a formatted exchange using the Log EIP:
+
+[source,xml]
+----
+<route id="foo">
+ <from uri="direct:foo"/>
+ <log message="${logExchange}"/>
+ <to uri="mock:foo"/>
+</route>
+----
+
== Example
You can use the log EIP which allows you to use
xref:languages:simple-language.adoc[Simple] language to construct a dynamic
message which gets logged.