Chapter 52. Log Sink
A sink that logs all data that it receives, useful for debugging purposes.
52.1. Configuration Options Copy linkLink copied to clipboard!
The following table summarizes the configuration options available for the log-sink Kamelet:
| Property | Name | Description | Type | Default | Example |
|---|---|---|---|---|---|
| loggerName | Logger Name | Name of the logging category to use | string | log-sink | |
| level | Log Level | Logging level to use | string | INFO | |
| logMask | Log Mask | Mask sensitive information like password or passphrase in the log | boolean | False | |
| marker | Marker | An optional Marker name to use | string | ||
| multiline | Multiline | If enabled then each information is outputted on a newline | boolean | False | |
| showAllProperties | Show All Properties | Show all of the exchange properties (both internal and custom) | boolean | False | |
| showBody | Show Body | Show the message body | boolean | True | |
| showBodyType | Show Body Type | Show the body Java type | boolean | True | |
| showExchangePattern | Show Exchange Pattern | Shows the Message Exchange Pattern (or MEP for short) | boolean | True | |
| showHeaders | Show Headers | Show the headers received | boolean | False | |
| showProperties | Show Properties | Show the exchange properties (only custom). Use showAllProperties to show both internal and custom properties. | boolean | False | |
| showStreams | Show Streams | Show the stream bodies (they may not be available in following steps) | boolean | False | |
| showCachedStreams | Show Cached Streams | Whether Camel should show cached stream bodies or not. | boolean | True |
* = Fields marked with an asterisk are mandatory.
52.2. Dependencies Copy linkLink copied to clipboard!
52.2.1. Quarkus dependencies Copy linkLink copied to clipboard!
52.3. Usage Copy linkLink copied to clipboard!
52.3.1. Camel JBang usage Copy linkLink copied to clipboard!
52.3.1.1. Prerequisites for JBang Copy linkLink copied to clipboard!
- Install JBang.
You have executed the following command:
jbang app install camel@apache/camel
jbang app install camel@apache/camelCopy to Clipboard Copied! Toggle word wrap Toggle overflow
52.3.1.2. Running a route with JBang Copy linkLink copied to clipboard!
Suppose you have a file named route.yaml with this content:
You can now run it directly through the following command.
camel run route.yaml
camel run route.yaml
52.3.2. Knative Sink Copy linkLink copied to clipboard!
You can use the log-sink Kamelet as a Knative sink by binding it to a Knative object.
log-sink-binding.yaml
52.3.3. Kafka Sink Copy linkLink copied to clipboard!
You can use the log-sink Kamelet as a Kafka sink by binding it to a Kafka topic.
log-sink-binding.yaml