From a5a1e1ff5b422497f5a854378e8ebd683dc4eab9 Mon Sep 17 00:00:00 2001 From: Alexa Kreizinger Date: Mon, 7 Jul 2025 17:02:48 -0700 Subject: [PATCH 1/2] pipeline: parsers: logfmt: general updates Signed-off-by: Alexa Kreizinger --- pipeline/parsers/logfmt.md | 11 +++++------ vale-styles/FluentBit/Spelling-exceptions.txt | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pipeline/parsers/logfmt.md b/pipeline/parsers/logfmt.md index fa83d178c..2137546ee 100644 --- a/pipeline/parsers/logfmt.md +++ b/pipeline/parsers/logfmt.md @@ -1,6 +1,6 @@ # Logfmt -The **logfmt** parser allows to parse the logfmt format described in [https://brandur.org/logfmt](https://brandur.org/logfmt) . A more formal description is in [https://godoc.org/github.com/kr/logfmt](https://godoc.org/github.com/kr/logfmt) . +The _logfmt_ parser lets you parse data in the [logfmt](https://pkg.go.dev/github.com/kr/logfmt?utm_source=godoc) format. Here is an example parsers configuration: @@ -25,13 +25,13 @@ parsers: {% endtab %} {% endtabs %} -The following log entry is a valid content for the parser defined above: +The following log entry is valid for the previously defined parser: ```text key1=val1 key2=val2 key3 ``` -After processing, it internal representation will be: +After processing, its internal representation will be: ```text [1540936693, {"key1"=>"val1", @@ -39,8 +39,7 @@ After processing, it internal representation will be: "key3"=>true}] ``` -If you want to be more strict than the logfmt standard and not parse lines where some attributes do -not have values (such as `key3`) in the example above, you can configure the parser as follows: +If you want to be more strict than the logfmt standard and not parse lines where certain attributes lack values (such as `key3` in the previoue example), you can configure the parser as follows: {% tabs %} {% tab title="parsers.yaml" %} @@ -63,4 +62,4 @@ parsers: ``` {% endtab %} -{% endtabs %} \ No newline at end of file +{% endtabs %} diff --git a/vale-styles/FluentBit/Spelling-exceptions.txt b/vale-styles/FluentBit/Spelling-exceptions.txt index 39beb30d8..35fcf9e8d 100644 --- a/vale-styles/FluentBit/Spelling-exceptions.txt +++ b/vale-styles/FluentBit/Spelling-exceptions.txt @@ -100,6 +100,7 @@ Kusto labelset librdkafka loadgenerator +logfmt Logstash Lua Lucene From cb70df02c02344afec9e17860ca1f74409ea5328 Mon Sep 17 00:00:00 2001 From: Alexa Kreizinger Date: Mon, 7 Jul 2025 17:15:23 -0700 Subject: [PATCH 2/2] typo/phrasing Signed-off-by: Alexa Kreizinger --- pipeline/parsers/logfmt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/parsers/logfmt.md b/pipeline/parsers/logfmt.md index 2137546ee..c98676637 100644 --- a/pipeline/parsers/logfmt.md +++ b/pipeline/parsers/logfmt.md @@ -39,7 +39,7 @@ After processing, its internal representation will be: "key3"=>true}] ``` -If you want to be more strict than the logfmt standard and not parse lines where certain attributes lack values (such as `key3` in the previoue example), you can configure the parser as follows: +If you want to be more strict than the logfmt standard and not parse lines where certain keys lack values (such as `key3` in the previous example), you can configure the parser as follows: {% tabs %} {% tab title="parsers.yaml" %}