diff --git a/content/chapter-parsers/date-parser/_index.md b/content/chapter-parsers/date-parser/_index.md index eb065c9a..82bea8f3 100644 --- a/content/chapter-parsers/date-parser/_index.md +++ b/content/chapter-parsers/date-parser/_index.md @@ -19,7 +19,7 @@ Note that parsing will fail if the format string does not match the entire templ parser parser_name { date-parser( format("") - template("'") + template("") ); }; ``` diff --git a/content/chapter-parsers/sdata-parser/_index.md b/content/chapter-parsers/sdata-parser/_index.md new file mode 100644 index 00000000..a870c004 --- /dev/null +++ b/content/chapter-parsers/sdata-parser/_index.md @@ -0,0 +1,24 @@ +--- +title: "Structured data (SDATA) parser" +weight: 1850 +--- + + +Available in {{% param "product.abbrev" %}} 4.1 and later. + +The `sdata-parser()` allows you to parse an RFC5424-style structured data string. You can use it to parse this relatively complex format separately, for example, to process malformatted messages. You can use the optional `prefix` option to add a specific string before the names of the parsed name-value pairs. + +## Declaration + +```shell + parser parser_name { + sdata-parser( + template("") + prefix("") + ); + }; +``` + +{{% include-headless "chunk/option-parser-prefix.md" %}} + +{{% include-headless "chunk/option-parser-template.md" %}} diff --git a/content/headless/chunk/option-parser-template.md b/content/headless/chunk/option-parser-template.md index f1b2832b..b2016b84 100644 --- a/content/headless/chunk/option-parser-template.md +++ b/content/headless/chunk/option-parser-template.md @@ -6,7 +6,7 @@ | | | | --------- | ---------------------------- | -| Synopsis: | template("${}") | +| Synopsis: | `template("${}")` | *Description:* The macro that contains the part of the message that the parser will process. It can also be a macro created by a previous parser of the log path. By default, the parser processes the entire message (`${MESSAGE}`).