Log Sink
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Stable"
A sink that logs all data that it receives, useful for debugging purposes.
Configuration Options
The following table summarizes the configuration options available for the log-sink
Kamelet:
Property | Name | Description | Type | Default | Example |
---|---|---|---|---|---|
Log Level |
Logging level to use. |
string |
INFO |
||
Log Mask |
Mask sensitive information like password or passphrase in the log. |
boolean |
false |
||
Logger Name |
Name of the logging category to use. |
string |
log-sink |
||
Marker |
An optional Marker name to use. |
string |
|||
Multiline |
If enabled then each information is outputted on a newline. |
boolean |
false |
||
Show All Properties |
Show all of the exchange properties (both internal and custom). |
boolean |
false |
||
Show Body |
Show the message body. |
boolean |
true |
||
Show Body Type |
Show the body Java type. |
boolean |
true |
||
Show Exchange Pattern |
Shows the Message Exchange Pattern (or MEP for short). |
boolean |
true |
||
Show Headers |
Show the headers received. |
boolean |
false |
||
Show Properties |
Show the exchange properties (only custom). Use showAllProperties to show both internal and custom properties. |
boolean |
false |
||
Show Streams |
Show the stream bodies (they may not be available in following steps). |
boolean |
false |
Dependencies
At runtime, the log-sink
Kamelet relies upon the presence of the following dependencies:
-
camel:kamelet
-
camel:log
Usage
This section describes how you can use the log-sink
.
Knative sink
You can use the log-sink
Kamelet as a Knative sink by binding it to a Knative object.
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: log-sink-binding
spec:
source:
ref:
kind: Channel
apiVersion: messaging.knative.dev/v1
name: mychannel
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: log-sink
Prerequisite
You have Camel K installed on the cluster.
Kafka sink
You can use the log-sink
Kamelet as a Kafka sink by binding it to a Kafka topic.
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: log-sink-binding
spec:
source:
ref:
kind: KafkaTopic
apiVersion: kafka.strimzi.io/v1beta1
name: my-topic
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: log-sink
Prerequisites
-
You’ve installed Strimzi.
-
You’ve created a topic named
my-topic
in the current namespace. -
You have Camel K installed on the cluster.