mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-25 23:20:45 +00:00
DOC: config: document logformat item naming and typecasting features
The ability to give a name to a logformat_node (known as logformat item in the documentation) implemented in2ed6068f2a
("MINOR: log: custom name for logformat node") wasn't documented. The same goes for the ability to force the logformat_node's output type to a specific type implemented in1448478d62
("MINOR: log: explicit typecasting for logformat nodes") Let's quickly describe such new usages at the start of the custom log format section.
This commit is contained in:
parent
435a9da267
commit
141bc5ba0d
@ -25925,6 +25925,17 @@ Special alias "%o" may be used to propagate its flags to all other
|
|||||||
logformat items on the same format string. This is particularly handy with
|
logformat items on the same format string. This is particularly handy with
|
||||||
quoted ("Q") and escaped ("E") string formats.
|
quoted ("Q") and escaped ("E") string formats.
|
||||||
|
|
||||||
|
Items can optionally be named using ('()'). The name must be provided right
|
||||||
|
after '%' (before arguments). It will automatically be used as key name when
|
||||||
|
encoding flag such as "json" or "cbor" is set. When no encoding flag is
|
||||||
|
specified (default), item name will be ignored. It is also possible to force
|
||||||
|
the item's output to a given type by appending ':type' after the name, like
|
||||||
|
this: %(itemname:itemtype)aliasname or %(itemname:itemtype)[expr] where
|
||||||
|
itemtype may be 'str', 'sint' or 'bool'. Specifying the type is only relevant
|
||||||
|
when an encoding method is used. Also, it is supported to provide an empty name
|
||||||
|
to force the output type on an anonymous item: %(:itemtype), ie: when encoding
|
||||||
|
is not set globally, see flags definitions below for more information.
|
||||||
|
|
||||||
Due to the original goal of custom log formats to be used for logging only,
|
Due to the original goal of custom log formats to be used for logging only,
|
||||||
there is a special case made of non-printable and unsafe characters (those
|
there is a special case made of non-printable and unsafe characters (those
|
||||||
outside ASCII codes 32 to 126 plus a few other ones) depending where they are
|
outside ASCII codes 32 to 126 plus a few other ones) depending where they are
|
||||||
|
Loading…
Reference in New Issue
Block a user