-
Notifications
You must be signed in to change notification settings - Fork 22
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
Expose a way to serialize a KV with any Serde Serializer #18
base: master
Are you sure you want to change the base?
Conversation
This is useful if you need to serialize to a more structured form, such as sending full JSON blobs to a HTTP endpoint.
Hey! I came here to file a ticket saying "make it easier to log inline JSON, i.e., serde structs as log values". Since there seems to be lots of conflicting information and questions about how to do this on the web (several threads in gitter, for example) I made https://github.com/ncalexan/slog-nested-values-example to work out what I needed to do. But I think your PR would do this and a little more. Is that correct? Can we get some discussion of this? I would definitely like to see an example and/or tests of this functionality, 'cuz it's not obvious that it exists without examples :) |
@ncalexan This PR is for dumping log messages into arbitrary Serde |
Ah, I see -- I misunderstood the role of |
So, do I close this one? |
@dpc Well, the PR is still relevant and exposes functionality that |
@@ -9,6 +9,7 @@ documentation = "https://docs.rs/slog-json" | |||
homepage = "https://github.com/slog-rs/slog" | |||
repository = "https://github.com/slog-rs/json" | |||
readme = "README.md" | |||
edition = "2018" |
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.
Do you think we can get away without it? Unless there's a really good reason, would rather not have these couple of folks stuck with older compiler or something, have to upgrade.
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.
This is useful if you need to serialize to a more structured form, such as sending full JSON blobs to a HTTP endpoint.