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
jax_fingerprint: Add --log-field option for custom log fields (#13084)
- Add --log-field <symbol> option to jax_fingerprint plugin that registers a custom log field usable in logging.yaml format strings (e.g., --log-field jaxja4 enables %<jaxja4>)
- Change TSLogMarshalCallback and LogField::CustomMarshalFunc from raw function pointers tostd::function to support capturing lambdas, enabling plugins to register log field callbacks with state
Copy file name to clipboardExpand all lines: doc/admin-guide/plugins/jax_fingerprint.en.rst
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,17 @@ This option specifies the name of the header field where the plugin stores the g
85
85
86
86
This option specifies the filename for the plugin log file. If not specified, log output will be suppressed.
87
87
88
+
.. option:: --log-field <symbol>
89
+
90
+
This option registers a custom log field with the given symbol name that can be used in
91
+
:file:`logging.yaml` log formats. The log field outputs the generated fingerprint value for each
92
+
transaction. If not specified, no custom log field is registered.
93
+
94
+
For example, if you specify ``--log-field jaxja4``, you can use ``%<jaxja4>`` in your log format
95
+
string in :file:`logging.yaml`.
96
+
97
+
.. note:: This option is only supported when the plugin is loaded as a global plugin in :file:`plugin.config`. Log fields are global and must be registered before log formats are parsed at startup. If you use a remap-only setup, you must also load the plugin globally with ``--log-field`` to register the log field.
0 commit comments