You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/11/10 10:40:13 UTC

[camel-kamelets] branch main updated: Support more properties for Log Sink/Action Kamelets

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new b5312f18 Support more properties for Log Sink/Action Kamelets
b5312f18 is described below

commit b5312f1862f7950610cea2f0e639b3704dd9bea1
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Thu Nov 10 16:09:26 2022 +0900

    Support more properties for Log Sink/Action Kamelets
---
 kamelets/log-action.kamelet.yaml                   | 68 +++++++++++++++++++++-
 kamelets/log-sink.kamelet.yaml                     | 68 +++++++++++++++++++++-
 .../resources/kamelets/log-action.kamelet.yaml     | 68 +++++++++++++++++++++-
 .../main/resources/kamelets/log-sink.kamelet.yaml  | 68 +++++++++++++++++++++-
 4 files changed, 268 insertions(+), 4 deletions(-)

diff --git a/kamelets/log-action.kamelet.yaml b/kamelets/log-action.kamelet.yaml
index 6f980bda..45ea5cb8 100644
--- a/kamelets/log-action.kamelet.yaml
+++ b/kamelets/log-action.kamelet.yaml
@@ -33,6 +33,11 @@ spec:
       Logs all data that flows between source and sink, useful for debugging purposes.
     type: object
     properties:
+      loggerName:
+        title: Logger Name
+        description: Name of the logging category to use
+        type: string
+        default: "log-action"
       level:
         title: Log Level
         description: Logging level to use
@@ -45,6 +50,52 @@ spec:
         - 'urn:alm:descriptor:com.tectonic.ui:select:WARN'
         - 'urn:alm:descriptor:com.tectonic.ui:select:ERROR'
         - 'urn:alm:descriptor:com.tectonic.ui:select:OFF'
+      logMask:
+        title: Log Mask
+        description: Mask sensitive information like password or passphrase in the log
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      marker:
+        title: Marker
+        description: An optional Marker name to use
+        type: string
+      multiline:
+        title: Multiline
+        description: If enabled then each information is outputted on a newline
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showAllProperties:
+        title: Show All Properties
+        description: Show all of the exchange properties (both internal and custom)
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showBody:
+        title: Show Body
+        description: Show the message body
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showBodyType:
+        title: Show Body Type
+        description: Show the body Java type
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showExchangePattern:
+        title: Show Exchange Pattern
+        description: Shows the Message Exchange Pattern (or MEP for short)
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
       showHeaders:
         title: Show Headers
         description: Show the headers received
@@ -52,6 +103,13 @@ spec:
         default: false
         x-descriptors:
         - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showProperties:
+        title: Show Properties
+        description: Show the exchange properties (only custom). Use showAllProperties to show both internal and custom properties.
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
       showStreams:
         title: Show Streams
         description: Show the stream bodies (they may not be available in following steps)
@@ -67,8 +125,16 @@ spec:
       uri: "kamelet:source"
       steps:
       - to:
-          uri: "log:log-action"
+          uri: "log:{{loggerName}}"
           parameters:
             level: "{{?level}}"
+            logMask: "{{?logMask}}"
+            marker: "{{?marker}}"
+            multiline: "{{?multiline}}"
+            showAllProperties: "{{?showAllProperties}}"
+            showBody: "{{?showBody}}"
+            showBodyType: "{{?showBodyType}}"
+            showExchangePattern: "{{?showExchangePattern}}"
             showHeaders: "{{?showHeaders}}"
+            showProperties: "{{?showProperties}}"
             showStreams: "{{?showStreams}}"
diff --git a/kamelets/log-sink.kamelet.yaml b/kamelets/log-sink.kamelet.yaml
index bb2a8b46..7bc9970d 100644
--- a/kamelets/log-sink.kamelet.yaml
+++ b/kamelets/log-sink.kamelet.yaml
@@ -33,6 +33,11 @@ spec:
       A sink that logs all data that it receives, useful for debugging purposes.
     type: object
     properties:
+      loggerName:
+        title: Logger Name
+        description: Name of the logging category to use
+        type: string
+        default: "log-sink"
       level:
         title: Log Level
         description: Logging level to use
@@ -45,6 +50,52 @@ spec:
         - 'urn:alm:descriptor:com.tectonic.ui:select:WARN'
         - 'urn:alm:descriptor:com.tectonic.ui:select:ERROR'
         - 'urn:alm:descriptor:com.tectonic.ui:select:OFF'
+      logMask:
+        title: Log Mask
+        description: Mask sensitive information like password or passphrase in the log
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      marker:
+        title: Marker
+        description: An optional Marker name to use
+        type: string
+      multiline:
+        title: Multiline
+        description: If enabled then each information is outputted on a newline
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showAllProperties:
+        title: Show All Properties
+        description: Show all of the exchange properties (both internal and custom)
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showBody:
+        title: Show Body
+        description: Show the message body
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showBodyType:
+        title: Show Body Type
+        description: Show the body Java type
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showExchangePattern:
+        title: Show Exchange Pattern
+        description: Shows the Message Exchange Pattern (or MEP for short)
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
       showHeaders:
         title: Show Headers
         description: Show the headers received
@@ -52,6 +103,13 @@ spec:
         default: false
         x-descriptors:
         - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showProperties:
+        title: Show Properties
+        description: Show the exchange properties (only custom). Use showAllProperties to show both internal and custom properties.
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
       showStreams:
         title: Show Streams
         description: Show the stream bodies (they may not be available in following steps)
@@ -67,8 +125,16 @@ spec:
       uri: "kamelet:source"
       steps:
       - to:
-          uri: "log:log-sink"
+          uri: "log:{{loggerName}}"
           parameters:
             level: "{{?level}}"
+            logMask: "{{?logMask}}"
+            marker: "{{?marker}}"
+            multiline: "{{?multiline}}"
+            showAllProperties: "{{?showAllProperties}}"
+            showBody: "{{?showBody}}"
+            showBodyType: "{{?showBodyType}}"
+            showExchangePattern: "{{?showExchangePattern}}"
             showHeaders: "{{?showHeaders}}"
+            showProperties: "{{?showProperties}}"
             showStreams: "{{?showStreams}}"
diff --git a/library/camel-kamelets/src/main/resources/kamelets/log-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/log-action.kamelet.yaml
index 6f980bda..45ea5cb8 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/log-action.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/log-action.kamelet.yaml
@@ -33,6 +33,11 @@ spec:
       Logs all data that flows between source and sink, useful for debugging purposes.
     type: object
     properties:
+      loggerName:
+        title: Logger Name
+        description: Name of the logging category to use
+        type: string
+        default: "log-action"
       level:
         title: Log Level
         description: Logging level to use
@@ -45,6 +50,52 @@ spec:
         - 'urn:alm:descriptor:com.tectonic.ui:select:WARN'
         - 'urn:alm:descriptor:com.tectonic.ui:select:ERROR'
         - 'urn:alm:descriptor:com.tectonic.ui:select:OFF'
+      logMask:
+        title: Log Mask
+        description: Mask sensitive information like password or passphrase in the log
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      marker:
+        title: Marker
+        description: An optional Marker name to use
+        type: string
+      multiline:
+        title: Multiline
+        description: If enabled then each information is outputted on a newline
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showAllProperties:
+        title: Show All Properties
+        description: Show all of the exchange properties (both internal and custom)
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showBody:
+        title: Show Body
+        description: Show the message body
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showBodyType:
+        title: Show Body Type
+        description: Show the body Java type
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showExchangePattern:
+        title: Show Exchange Pattern
+        description: Shows the Message Exchange Pattern (or MEP for short)
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
       showHeaders:
         title: Show Headers
         description: Show the headers received
@@ -52,6 +103,13 @@ spec:
         default: false
         x-descriptors:
         - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showProperties:
+        title: Show Properties
+        description: Show the exchange properties (only custom). Use showAllProperties to show both internal and custom properties.
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
       showStreams:
         title: Show Streams
         description: Show the stream bodies (they may not be available in following steps)
@@ -67,8 +125,16 @@ spec:
       uri: "kamelet:source"
       steps:
       - to:
-          uri: "log:log-action"
+          uri: "log:{{loggerName}}"
           parameters:
             level: "{{?level}}"
+            logMask: "{{?logMask}}"
+            marker: "{{?marker}}"
+            multiline: "{{?multiline}}"
+            showAllProperties: "{{?showAllProperties}}"
+            showBody: "{{?showBody}}"
+            showBodyType: "{{?showBodyType}}"
+            showExchangePattern: "{{?showExchangePattern}}"
             showHeaders: "{{?showHeaders}}"
+            showProperties: "{{?showProperties}}"
             showStreams: "{{?showStreams}}"
diff --git a/library/camel-kamelets/src/main/resources/kamelets/log-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/log-sink.kamelet.yaml
index bb2a8b46..7bc9970d 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/log-sink.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/log-sink.kamelet.yaml
@@ -33,6 +33,11 @@ spec:
       A sink that logs all data that it receives, useful for debugging purposes.
     type: object
     properties:
+      loggerName:
+        title: Logger Name
+        description: Name of the logging category to use
+        type: string
+        default: "log-sink"
       level:
         title: Log Level
         description: Logging level to use
@@ -45,6 +50,52 @@ spec:
         - 'urn:alm:descriptor:com.tectonic.ui:select:WARN'
         - 'urn:alm:descriptor:com.tectonic.ui:select:ERROR'
         - 'urn:alm:descriptor:com.tectonic.ui:select:OFF'
+      logMask:
+        title: Log Mask
+        description: Mask sensitive information like password or passphrase in the log
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      marker:
+        title: Marker
+        description: An optional Marker name to use
+        type: string
+      multiline:
+        title: Multiline
+        description: If enabled then each information is outputted on a newline
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showAllProperties:
+        title: Show All Properties
+        description: Show all of the exchange properties (both internal and custom)
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showBody:
+        title: Show Body
+        description: Show the message body
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showBodyType:
+        title: Show Body Type
+        description: Show the body Java type
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showExchangePattern:
+        title: Show Exchange Pattern
+        description: Shows the Message Exchange Pattern (or MEP for short)
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
       showHeaders:
         title: Show Headers
         description: Show the headers received
@@ -52,6 +103,13 @@ spec:
         default: false
         x-descriptors:
         - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      showProperties:
+        title: Show Properties
+        description: Show the exchange properties (only custom). Use showAllProperties to show both internal and custom properties.
+        type: boolean
+        default: false
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
       showStreams:
         title: Show Streams
         description: Show the stream bodies (they may not be available in following steps)
@@ -67,8 +125,16 @@ spec:
       uri: "kamelet:source"
       steps:
       - to:
-          uri: "log:log-sink"
+          uri: "log:{{loggerName}}"
           parameters:
             level: "{{?level}}"
+            logMask: "{{?logMask}}"
+            marker: "{{?marker}}"
+            multiline: "{{?multiline}}"
+            showAllProperties: "{{?showAllProperties}}"
+            showBody: "{{?showBody}}"
+            showBodyType: "{{?showBodyType}}"
+            showExchangePattern: "{{?showExchangePattern}}"
             showHeaders: "{{?showHeaders}}"
+            showProperties: "{{?showProperties}}"
             showStreams: "{{?showStreams}}"