-
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: don't omit last item if it does not have a value #4359
Conversation
622bc3c
to
87c9410
Compare
With this line in foo.log
The unpatched version outputs:
And the fixed version outputs:
|
|
Thank you for contribution.
I think it should be Note: Original PR to support logfmt is #871. #1737 might cause regression ? |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
I had another look at this, and current logfmt gives all bare keys a nil value, it just misses the last one. So those are two independent bugs, and we should be able to merge this pr as-is. I'll file another pr for the nil vs true issue. |
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`.
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 <[email protected]>
87c9410
to
4834054
Compare
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 <[email protected]>
In #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 <[email protected]>
A line like `foo=bar baz` should be parsed to `{"foo"=>"bar", "baz"=>nil}`, but `baz` was silently omitted by returning early from the parser. Signed-off-by: Dennis Kaarsemaker <[email protected]>
4834054
to
2851630
Compare
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 <[email protected]> Signed-off-by: Manal Geries <[email protected]>
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 <[email protected]> Signed-off-by: root <[email protected]>
A line like
foo=bar baz
should be parsed to{"foo"=>"bar", "baz"=>nil}
, butbaz
was silently omitted by returning early from the parser.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:
Documentation
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.