-
Notifications
You must be signed in to change notification settings - Fork 717
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
journald: Do not log additional string data in Debug representation #1710
Comments
@Ralith You've said over in the merge request that this is intended because it helps distinguish between 1 as a number, and 1 as a string, which one couldn't if strings were logged directly. I understand the motivation, but my concern is that this effectively requires downstream consumers of the journal to "unparse" Rust's It also seems rather unusual to add extra formatting to field values, as far as I can see: The slog implementation uses |
On review I think I agree; the common case (especially in idiomatic journald clients) of working with strings trumps the rather weird case of meaningfully dynamically-typed fields. I'd be happy to approve a fix. |
I'll make a MR after the tests are merged. We can also have a flag, similar to the field prefix, to toggle between the literal and the debug representation of strings, if you like 🙂 |
Eh, I'd rather avoid the complexity. |
Thanks for the contributions! |
See #1710: Do not write strings in Debug representation. ## Motivation As discussed in #1710 writing strings literally makes tracing-journald behave like other journal clients, and allows 3rd party journal readers to extract the original value from the journal without having to "un"-parse the Debug representation of Rust strings. Fixes #1710.
See #1710: Do not write strings in Debug representation. ## Motivation As discussed in #1710 writing strings literally makes tracing-journald behave like other journal clients, and allows 3rd party journal readers to extract the original value from the journal without having to "un"-parse the Debug representation of Rust strings. Fixes #1710.
See #1710: Do not write strings in Debug representation. ## Motivation As discussed in #1710 writing strings literally makes tracing-journald behave like other journal clients, and allows 3rd party journal readers to extract the original value from the journal without having to "un"-parse the Debug representation of Rust strings. Fixes #1710.
See #1710: Do not write strings in Debug representation. ## Motivation As discussed in #1710 writing strings literally makes tracing-journald behave like other journal clients, and allows 3rd party journal readers to extract the original value from the journal without having to "un"-parse the Debug representation of Rust strings. Fixes #1710.
See #1710: Do not write strings in Debug representation. ## Motivation As discussed in #1710 writing strings literally makes tracing-journald behave like other journal clients, and allows 3rd party journal readers to extract the original value from the journal without having to "un"-parse the Debug representation of Rust strings. Fixes #1710.
Bug Report
Follow up from #1709 (comment)
Description
tracing-journald
currently logs additional string fields in theirDebug
representation, i.e. this codewrites
FOO="foo"
to the journal, i.e. with extra quotes fromformat!("{:?}")
.I expected
FOO=foo
, i.e. a regular string.The text was updated successfully, but these errors were encountered: