-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
logfmt: bare keys get "true" as value, not "nil" #6099
Merged
Merged
Conversation
This file contains 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
seveas
requested review from
edsiper,
leonardo-albertovich,
fujimotos and
koleini
as code owners
September 26, 2022 12:14
seveas
force-pushed
the
logfmt-nil-true
branch
from
September 26, 2022 12:15
2540be9
to
372b409
Compare
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>
seveas
force-pushed
the
logfmt-nil-true
branch
from
September 26, 2022 12:41
372b409
to
17f3291
Compare
nokute78
changed the title
logfmt: bare keys get
logfmt: bare keys get "true" as value, not "nil"
Sep 30, 2022
true
as value, not nil
nokute78
approved these changes
Sep 30, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 }
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>
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
true
value, 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.