-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathlog-action.kamelet.yaml
149 lines (149 loc) · 6.7 KB
/
log-action.kamelet.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1
kind: Kamelet
metadata:
name: log-action
annotations:
camel.apache.org/kamelet.support.level: "Stable"
camel.apache.org/catalog.version: "2.3.0"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFN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g0KPC9nPg0KPGc+DQo8L2c+DQo8L3N2Zz4NCg=="
camel.apache.org/provider: "Red Hat"
camel.apache.org/kamelet.group: "Logging"
camel.apache.org/kamelet.namespace: "Logging"
labels:
camel.apache.org/kamelet.type: "action"
spec:
definition:
title: "Log Action"
description: |-
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
type: string
default: "INFO"
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:select:TRACE'
- 'urn:alm:descriptor:com.tectonic.ui:select:DEBUG'
- 'urn:alm:descriptor:com.tectonic.ui:select:INFO'
- '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
type: boolean
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)
type: boolean
default: false
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
showCachedStreams:
title: Show Cached Streams
description: Whether Camel should show cached stream bodies or not.
type: boolean
default: true
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
dependencies:
- "camel:kamelet"
- "camel:log"
template:
from:
uri: "kamelet:source"
steps:
- to:
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}}"
showCachedStreams: "{{?showCachedStreams}}"