You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -39,19 +42,19 @@ The field will look like this in the log:
39
42
40
43
All logging plugins use the same table for logging.
41
44
If you set `custom_fields_by_lua` in one plugin, all logging plugins that execute after that plugin will also use the same configuration.
42
-
For example, if you configure fields via `custom_fields_by_lua` in [File Log](/plugins/file-log/), those same fields will appear in [Kafka Log](/plugins/kafka-log/), since File Log executes first.
45
+
For example, if you configure fields via `custom_fields_by_lua` in {% unless page.name =="Syslog" %}{{page.name}}{% else %}[File Log](/plugins/file-log/){% endunless %}, those same fields will appear in [Syslog](/plugins/syslog/), since {{page.name}} executes first.
43
46
44
47
If you want all logging plugins to use the same configuration, we recommend using the [Pre-function](/plugins/pre-function/) plugin to call [kong.log.set_serialize_value](/gateway/pdk/reference/kong.log/#kong-log-set-serialize-value-key-value-options) so that the function is applied predictably and is easier to manage.
45
48
46
49
If you **don't** want all logging plugins to use the same configuration, you need to manually disable the relevant fields in each plugin.
47
50
48
-
For example, if you configure a field in File Log that you don't want appearing in Kafka Log, set that field to `return nil` in the Kafka Log plugin:
51
+
For example, if you configure a field in File Log that you don't want appearing in {{include.name}}, set that field to `return nil` in the {{include.name}} plugin:
description: 'Publish request and response logs to a Solace endpoint or topic'
10
+
11
+
products:
12
+
- gateway
13
+
14
+
works_on:
15
+
- on-prem
16
+
- konnect
17
+
18
+
min_version:
19
+
gateway: '3.12'
20
+
21
+
topologies:
22
+
on_prem:
23
+
- hybrid
24
+
- db-less
25
+
- traditional
26
+
konnect_deployments:
27
+
- hybrid
28
+
- cloud-gateways
29
+
- serverless
30
+
31
+
tags:
32
+
- logging
33
+
- events
34
+
- solace
35
+
36
+
search_aliases:
37
+
- solace-log
38
+
- events
39
+
- event-gateway
40
+
41
+
icon: solace-log.png
42
+
43
+
categories:
44
+
- logging
45
+
46
+
related_resources:
47
+
- text: Solace Upstream plugin
48
+
url: /plugins/solace-upstream/
49
+
- text: Solace Consume plugin
50
+
url: /plugins/solace-consume/
51
+
- text: Event Gateway
52
+
url: /event-gateway/
53
+
---
54
+
55
+
Publish request and response logs in `JSON` format to a [Solace](https://solace.com/) endpoint or topic.
56
+
For more information, see [Solace Event Messaging Overview](https://docs.solace.com/Messaging/messaging-overview.htm).
57
+
58
+
Kong also provides plugins for publishing messages to and consuming messages from Solace:
59
+
*[Solace Upstream](/plugins/solace-upstream/)
60
+
*[Solace Consume](/plugins/solace-consume/)
61
+
62
+
## Log format
63
+
64
+
{% include /plugins/logging/log-format.md %}
65
+
66
+
### Log format definitions
67
+
68
+
{% include /plugins/logging/json-object-log.md %}
69
+
70
+
## Implementation details
71
+
72
+
This plugin leverages the [log PDK](/gateway/pdk/reference/kong.log/) to collect and [customize](#custom-fields-by-lua) log fields.
73
+
74
+
The prepared log message is sent to the Solace broker via the official [Solace C API](https://docs.solace.com/API/Messaging-APIs/C-API/c-api-home.htm). The sending job is executed in a background timer context so that it doesn't block client requests.
75
+
76
+
If the [custom Lua code](#custom-fields-by-lua) associated with the log fields fails to execute, the relevant fields remain untouched.
77
+
78
+
## Custom fields by Lua
79
+
80
+
{% include /plugins/logging/log-custom-fields-by-lua.md custom_fields_by_lua='config.message.custom_fields_by_lua' custom_fields_by_lua_slug='config-message-custom-fields-by-lua' name=page.name slug=page.slug %}
0 commit comments