apache / apache/camel-kamelets

Create more log kamelets

Open
#2,504 2 comments 0 reactions 1 assignee Claimed by @EmyysJanaK View on GitHub
Dominant language
Java
Stars
71
Forks
88
Avg merge
1d 13h
Merged PRs (30d)
70

Description

Currently, there is a log Kamelet (action and sink):

- https://camel.apache.org/camel-kamelets/4.10.x/log-action.html
- https://camel.apache.org/camel-kamelets/4.10.x/log-sink.html

Over time, this became a bit big, because of the number of parameters needed.

The questions are:

1. How can the number of parameters be low to not overwhelm new users?
2. How can the number of parameters be complete to cater advanced users?

I would propose to split logging into 4 kamelets:

1. Log
2. Log-quick
3. Log-data
4. Log-message

----------------------------

### Details per Kamelet

1. Log

This is the log Kamelet that most users can use. I would keep the number of parameters low (using a convention-over-configuration approach). This could be the parameters:

- level
- name (loggerName)
- showBody
- showBodyType
- showHeaders
- showProperties

2. Log-quick

This can be a Kamelet without parameters to quickly log something.

The URI could be

log:quick-log-action?showAll=true&multiline=true

If you want to provide some minimal parameters, then only provide _level_ and _name_ with good defaults.

3. Log-data

This can be a Kamelet with most log parameters for advanced user. These are all the parameters of the current log Kamelet +

- plain
- style
- showCaughtException (formatting)
- showException (formatting)
- showExchangeId
- showVariables

4. Log-message

This Kamelet uses the log-eip (https://camel.apache.org/components/4.10.x/eips/log-eip.html) with the following parameters:

- level
- name
- language
- message

In this way, these 4 Kamelets would cover most uses cases for most users.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.