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
Copy file name to clipboardExpand all lines: app/_includes/plugins/logging/log-custom-fields-by-lua.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,20 +42,20 @@ The field will look like this in the log:
42
42
43
43
All logging plugins use the same table for logging.
44
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.
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.
45
+
For example, if you configure fields via `custom_fields_by_lua` in File log those same fields will appear in [Syslog](/plugins/syslog/), since {{page.name}} executes first.
46
46
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.
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.
48
48
49
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.
50
50
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:
51
+
*For example, if you configure a field in File Log that you don't want appearing in Syslog, set that field to `return nil` in the File Log plugin:
0 commit comments