logfmt: bare keys get "true" as value, not "nil"#6099
Merged
edsiper merged 1 commit intofluent:masterfrom Oct 15, 2022
Merged
Conversation
2540be9 to
372b409
Compare
Contributor
Author
|
Test logline: Old output New output ( |
In fluent#4359, @nokute78 notes that bare keys in logfmt lines get the wrong value after parsing: they should get a `true` value, not `nil`. Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
372b409 to
17f3291
Compare
true as value, not nil
nokute78
approved these changes
Sep 30, 2022
Contributor
nokute78
left a comment
There was a problem hiding this comment.
LGTM.
Note: I modified PR title to pass CI.
Note: I referred to following document.
https://pkg.go.dev/github.com/kr/logfmt#pkg-overview
Example logfmt message:
foo=bar a=14 baz="hello kitty" cool%story=bro f %^asdf
Example result in JSON:
{ "foo": "bar", "a": 14, "baz": "hello kitty", "cool%story": "bro", "f": true, "%^asdf": true }
Member
|
thansk! |
mgeriesa
pushed a commit
to mgeriesa/fluent-bit
that referenced
this pull request
Oct 25, 2022
In fluent#4359, @nokute78 notes that bare keys in logfmt lines get the wrong value after parsing: they should get a `true` value, not `nil`. Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net> Signed-off-by: Manal Geries <mgeriesa@gmail.com>
sumitd2
pushed a commit
to sumitd2/fluent-bit
that referenced
this pull request
Feb 8, 2023
In fluent#4359, @nokute78 notes that bare keys in logfmt lines get the wrong value after parsing: they should get a `true` value, not `nil`. Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net> Signed-off-by: root <root@sumit-acs.novalocal>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #4359, @nokute78 notes that bare keys in logfmt lines get the wrong
value after parsing: they should get a
truevalue, notnil.Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.